在某些场景,直接使用 document.body.scrollTop会不生效,使用定时器可以解决。
document.body.scrollTop
let hi = 100 setTimeout(function(){ document.body.scrollTop = hi }, 200)