码迷,mamicode.com
首页 > Web开发 > 详细

锚点定位,jquery定位到页面指定位置

时间:2018-11-20 11:36:49      阅读:182      评论:0      收藏:0      [点我收藏+]

标签:指定位置   line   nim   top   set   sof   定位   bsp   scrolltop   

jquery锚点定位

$(‘body,html‘).animate({scrollTop: $(‘#ter1‘).offset().top}, 500);
#ter1是你要定位的id对象,
500是0.5秒执行完成

锚点定位,jquery定位到页面指定位置

标签:指定位置   line   nim   top   set   sof   定位   bsp   scrolltop   

原文地址:https://www.cnblogs.com/cuihongyu3503319/p/9987362.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!