$(document).ready(function (){
$("#scroll").click(function (){
$('html, body').animate({
scrollTop: $("#div").offset().top
}, 500);
});
});
使用scrollTop方法,加上一点延时动画(animate)
$(document).ready(function (){
$("#scroll").click(function (){
$('html, body').animate({
scrollTop: $("#div").offset().top
}, 500);
});
});
使用scrollTop方法,加上一点延时动画(animate)
转载于:https://www.cnblogs.com/wangyongx/p/10932253.html