jQueryaminate方法定位到页面具体位置_jquery
来源:懂视网
责编:小采
时间:2020-11-27 21:17:55
jQueryaminate方法定位到页面具体位置_jquery
jQueryaminate方法定位到页面具体位置_jquery:通过jQuery的aminate动画方法定位。 示例如下: 代码如下: scrollOffset($(#qa).offset()); // jQuery 定位让body的scrollTop等于pos的top,就实现了滚动 function scrollOffset(scroll_offset) { $(body,ht
导读jQueryaminate方法定位到页面具体位置_jquery:通过jQuery的aminate动画方法定位。 示例如下: 代码如下: scrollOffset($(#qa).offset()); // jQuery 定位让body的scrollTop等于pos的top,就实现了滚动 function scrollOffset(scroll_offset) { $(body,ht

通过jQuery的aminate动画方法定位。
示例如下:
代码如下:
scrollOffset($("#qa").offset());
// jQuery 定位让body的scrollTop等于pos的top,就实现了滚动
function scrollOffset(scroll_offset) {
$("body,html").animate({
scrollTop: scroll_offset.top - 70
}, 0);
}
jQueryaminate方法定位到页面具体位置_jquery
jQueryaminate方法定位到页面具体位置_jquery:通过jQuery的aminate动画方法定位。 示例如下: 代码如下: scrollOffset($(#qa).offset()); // jQuery 定位让body的scrollTop等于pos的top,就实现了滚动 function scrollOffset(scroll_offset) { $(body,ht