go=function(index){
var top = $('#caseNewGuide' + index).offset().top;
$('html, body').animate({
scrollTop: top
}, 500)
}转载于:https://www.cnblogs.com/wangqiao170/p/6679489.html
本文介绍了一种使用JavaScript实现页面平滑滚动至特定元素的方法。通过获取目标元素的位置,并利用jQuery的animate方法来实现平滑滚动效果。
go=function(index){
var top = $('#caseNewGuide' + index).offset().top;
$('html, body').animate({
scrollTop: top
}, 500)
}转载于:https://www.cnblogs.com/wangqiao170/p/6679489.html

被折叠的 条评论
为什么被折叠?