源码:
$(window).scroll(function () { var scrollTop = $(this).scrollTop() var scrollHeight = $(document).height() var windowHeight = $(this).height() console.log(`scrollTop: ${scrollTop}`) console.log(`windowHeight: ${windowHeight}`) console.log(`scrollHeight: ${scrollHeight}`) })
为啥当页面滚动到底部时, scrollTop + windowHeight
的总大小 [大于] scrollHeight
, 不是应该相等才对吗?
付费偷看金额在0.1-10元之间
一周热门 更多>