jQuery锚点跳转滚动条平滑滚动一句话代码

$("html,body").animate({scrollTop: $("#box").offset().top}, 1000);

(完)

原文地址:https://www.cnblogs.com/ret00100/p/1724635.html