You can set the scrollTop
, like this:(您可以设置scrollTop
,如下所示:)
$('html,body').scrollTop(0);
Or if you want a little animation instead of a snap to the top:(或者,如果你想要一个小动画而不是一个快照到顶部:)
$('html, body').animate({ scrollTop: 0 }, 'fast');
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…