I was aware that the scrolling behaviour of browsers can be adjusted with JavaScript. Today I learned that it’s also possible to do with CSS:
.container {
scroll-behaviour: smooth;
}
Sadly it’s not available in all browsers, Internet Explorer, Safari and Opera do not support it.
Check out the CSS Tricks article about the scroll-behaviour
property.
Leave a Reply