smoothScroll
Smoothly scrolls the element on which it's called into the visible area of the browser window.
- Use
Element.scrollIntoView()to scroll the element. - Use
{ behavior: 'smooth' }to scroll smoothly.
Smoothly scrolls the element on which it's called into the visible area of the browser window.
Element.scrollIntoView() to scroll the element.{ behavior: 'smooth' } to scroll smoothly.