H5 monitor browser scroll bar scrollbar

 Listening scrollbar scrollbar (phone adapter)

1. document.documentElement.scrollHeight: html entire height of containing hidden interface level

2. window.pageYOffset: volume to be scrolled height

3. window.innerHeight: visible window height, the same

4. 2 plus 3 wherein the height is not less than the height of the bottom roll 1 represents

5. Note: listening rolling body disposed onscroll body can not be set in height: 100% can be used

Guess you like

Origin www.cnblogs.com/dlm17/p/12345415.html
Recommended