jquery滚动到页面底部问题?
源码:
$(window).scroll(function () { var scrollTop = $(this).scrollTop() var scrollHei优艾设计网_设计百科ght = $(document).height() var windowHeight = $(this).height()console.log(`scrollTop: ${scrollTop}`) console.log(`windowHeight: ${windowHeight}`) console.log(`scrollHeight: ${scrollHeight}`)})
为啥当页面滚动到底部时, scrollTop + windowHeight
的总大小 [大于] scrollHeight
, 不是应该相等才对吗?
精彩评论