Closed vogdb closed 4 years ago
The issue is that scrollTop isn't actually a CSS attribute so it can't be animated via CSS. You'd have to fake it via another attribute. See http://stackoverflow.com/questions/10260666/animate-scrolling-with-css3.
body {
scroll-behavior: smooth;
}
@vogdb Just use this CSS property and even normal JS will work for you document.body.scrollTop = 0
Please consider these two fiddles:
scrollTop
works with pureanimate
http://jsfiddle.net/a935jx9r/1/scrollTop
does not work with the latesttransition
http://jsfiddle.net/aaf62fou/1/