오늘은 scrollIntoview web API를 알게 되었다. 까먹지 않게 정리해보자! scrollIntoView는 모든 element에서 사용이 가능하다. 간단하게 버튼을 클릭했을 때 내가 만들어놓은 보라색 박스로 스크롤이 이동할 수 있도록 했다. const button = document.querySelector('button'); const box = document.querySelector('.box'); button.addEventListener('click', () => { box.scrollIntoView({ behavior: 'smooth' }); }); scrollIntoView API에는 특정 옵션을 전달할 수 있는데 대표적으로 behavior, block 등이 있다. behavior..