Web Scroll Control

Darcy Daeseok YU ·2023년 1월 4일
0

window.scrollY, // 스크롤 값
document.documentElement.scrollHeight, // 전체 스크롤 높이
document.documentElement.clientHeight // 사용자가 현재 보고 있는 화면의 높이

     if (
        window.scrollY + document.documentElement.clientHeight ===
        document.documentElement.scrollHeight -
          document.documentElement.clientHeight * 0.6 // 하단에서 60%오프셋
      ) {
       	 console.log("scroll data loading  === ", e.scrollHeight, e.scrollY);
      }
      
profile
React, React-Native https://darcyu83.netlify.app/

0개의 댓글