任何人都可以帮助我吗?尝试使用我的平滑滚动和控制速度添加“慢”功能。
希望实现真正的“流畅滚动”。
以下是代码:
$(document).ready(function(){
$('.smoothscroll').live('click',function(e){
$('html,body').animate({
'scrollTop': $($(this).attr('href')).offset().top+'px'
});
e.preventDefault();
});
});