标签:color 滑动 span 滚动条 const class bsp int val
toTop() { let top = document.documentElement.scrollTop || document.body.scrollTop; // 实现滚动效果 const timeTop = setInterval(() => { document.body.scrollTop = document.documentElement.scrollTop = top -= 50; if (top <= 0) { clearInterval(timeTop); } console.log(document.documentElement.scrollTop); }, 10);
标签:color 滑动 span 滚动条 const class bsp int val
原文地址:https://www.cnblogs.com/xiaozhang666/p/11433825.html