window.scroll原生滚动

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

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

猜你喜欢

转载自www.cnblogs.com/amiezhang/p/9506694.html
今日推荐