scrollTop when the CSS flex-direction property is set to column-reverse
- Summary
- When flex-direction: column-reverse
- The reference point for scrollTop is the very bottom of the scroll
- scrollTop takes values from -n to 0
- When the scroll bar is at the very top, scrollTop === -n
- When the scroll bar is at the very bottom, scrollTop === 0
- When flex-direction: column-reverse
- The general case
- When the scroll bar is at the very top
- scrollTop === 0
- When the scroll bar is at the very bottom
- scrollTop === scrollHeight - clientHeight
- When the scroll bar is at the very top
- When flex-direction: column-reverse is applied via CSS
- When the scroll bar is at the very top
- -scrollTop === scrollHeight - clientHeight
- When the scroll bar is at the very bottom
- scrollTop === 0
- When the scroll bar is at the very top
20210810
Leave a comment