And: https://kryogenix.org/code/browser/everyonehasjs.html
Here's an HTML and CSS snippet to implement smooth scrolling:
""
That's it. An empty string. In other words, nothing. It's already implemented in the browser! Wasn't that easy?
Now stop wasting time on an JS-based implementation of smooth scrolling that breaks in at least 1 browser.
And: https://kryogenix.org/code/browser/everyonehasjs.html