We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
一直对ScrollTop、ScrollHeight、ClientHeight、OffsetHeight这些内容傻傻分不清楚,今天整体下。
scrollHeight含有scroll当然这个高度与滚动相关。
scroll
如果元素滚动到底,下面等式返回true,没有则返回false. element.scrollHeight - element.scrollTop === element.clientHeight
border
The text was updated successfully, but these errors were encountered:
清楚明了,写的不错
Sorry, something went wrong.
clientHeight markdown 层级错了
good
nice!
thanks
No branches or pull requests
一直对ScrollTop、ScrollHeight、ClientHeight、OffsetHeight这些内容傻傻分不清楚,今天整体下。
scrollHeight
scrollHeight含有
scroll
当然这个高度与滚动相关。scrollTop
clientHeight
clientHeight 可以通过 CSS height + CSS padding - 水平滚动条高度 (如果存在)来计算
clientTop
border
的高度offsetHeight
通常,元素的offsetHeight是一种衡量标准,包括元素的边框、垂直内边距和元素的水平滚动条(如果存在且渲染的画)和元素的CSS高度。
offsetTop
The text was updated successfully, but these errors were encountered: