首页 > 语言 > JavaScript > 正文

jquery 页面滚动到指定DIV实现代码

2024-05-06 14:35:26
字体:
来源:转载
供稿:网友
参数id为页面元素id
代码如下:
function mScroll(id){$("html,body").stop(true);$("html,body").animate({scrollTop: $("#"+id).offset().top}, 1000);}
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选