zl程序教程

您现在的位置是:首页 >  前端

当前栏目

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

jQuery代码 实现 页面 指定 div 滚动
2023-06-13 09:15:05 时间
参数id为页面元素id
复制代码代码如下:

functionmScroll(id){$("html,body").stop(true);$("html,body").animate({scrollTop:$("#"+id).offset().top},1000);}