<script type="text/javascript">
$(document).ready(function(){
// 页面加载完成3秒后开始滚动
setTimeout(function(){
scroll();
},3000);
});
function scroll () {
// 定时器秒数越大滚动越快
setInterval(function(){
//数字加的越大滚动越快,加入定时函数就是你要的效果了
document.body.scrollTop += 1;
window.scrollTo({
top: document.body.scrollTop,
behavior: "smooth"
});
},100);
}
</script>
转载于:https://my.oschina.net/u/1397053/blog/2221664