window.scroll原生滚动

window.scroll({
    top: 100,
    behavior: 'smooth'
})

js原生已经支持模拟滚动的效果啦~~~

原文地址:https://www.cnblogs.com/amiezhang/p/9506694.html