jQuery animate方法定位页面具体位置(示例)
jquery实现定位到页面具体位置,通过jQuery的animate动画方法定位。
例子,通过jQuery的animate动画方法定位。
scrollOffset($("#qa").offset());
// jQuery 定位让body的scrollTop等于pos的top,实现滚动
function scrollOffset(scroll_offset) {
$("body,html").animate({
scrollTop: scroll_offset.top - 70
}, 0);
}
您可能感兴趣的文章:
jQuery animate方法定位页面具体位置(示例)
jQuery aminate方法定位到页面具体位置
jQuery动画效果animate和scrollTop结合使用实例
JQuery 动画卷页 返回顶部 动画特效(兼容Chrome)
jquery animate动画方法使用介绍
jquery animate动画函数用法浅析
jQuery动画animate方法实例分享
Jquery 自定义动画概述及示例
jQuery动画animate方法使用介绍
jQuery Animation实现CSS3动画示例介绍