You can change the scroll behavior of your page (or an element) with the scroll-behavior
property. Using smooth
will enable animated scrolling when the user clicks on an anchor link on your page. Normal scrolling by the user is not affected by this property.
html {
scroll-behavior: smooth;
}