Skip to content
JS scroll학습 기록

JS scroll values: document height, viewport height, scroll position

1 min readLearningMoved from my Tistory blogRead the Korean original

Total document height : document.documentElement.scrollHeight

Height the browser is showing (vh) : window.innerHeight

Scroll position : document.documentElement.scrollTop

Scroll position / (total document height - height the browser is showing)

  • #JS scroll info

More in Learning