标签:goup body this animation doc || scrolltop ons 获取
hangleGoUp(){
console.log("开始")
let nowTop = document.body.scrollTop || document.documentElement.scrollTop; // 获取当前滚动条位置
if (nowTop > 0) {
window.requestAnimationFrame(this.hangleGoUp);
window.scrollTo (0,nowTop - (nowTop/50));
}
console.log("结尾")
}
标签:goup body this animation doc || scrolltop ons 获取
原文地址:https://www.cnblogs.com/supereast/p/11703226.html