Open whizbz11 opened 8 years ago
一直对ScrollTop、ScrollHeight、ClientHeight、OffsetHeight这些内容傻傻分不清楚,今天整体下。
scrollHeight含有scroll当然这个高度与滚动相关。
scroll
如果元素滚动到底,下面等式返回true,没有则返回false. element.scrollHeight - element.scrollTop === element.clientHeight
border
清楚明了,写的不错
clientHeight markdown 层级错了
good
nice!
thanks
一直对ScrollTop、ScrollHeight、ClientHeight、OffsetHeight这些内容傻傻分不清楚,今天整体下。
scrollHeight
scrollHeight含有
scroll
当然这个高度与滚动相关。scrollTop
clientHeight
clientTop
border
的高度offsetHeight
offsetTop