티스토리 뷰

공부

[JS] Browser scrollTop

승가비 2019. 12. 21. 23:47
728x90
return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;

[출처] https://stackoverflow.com/questions/19618545/body-scrolltop-vs-documentelement-scrolltop-vs-window-pageyoffset-vs-window-scro

728x90
댓글