2022/04/05 스크롤 상위로 올라가고 싶을 때

2022. 4. 5. 22:37Project : 근의 공식(Muscle Formula)

https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollBy

 

Window.scrollBy() - Web APIs | MDN

The Window.scrollBy() method scrolls the document in the window by the given amount.

developer.mozilla.org

window.scrollBy(0, -window.innerHeight);