jQuery 动画滚动 [英] jQuery animate scroll
问题描述
我不确定如何调用该效果,但有人可以将我指向一个可以帮助我实现与本网站相同的效果的库吗?
I'm not sure how to call the effect, but can someone point me into a library that would help me do the same effect as this website?
基本上,它会在鼠标单击时将行向上移动到页面顶部.如果没有专门的效果库,代码片段(最好是 jQuery)可以提供帮助.
Basically, it moves up the row to the top of the page on mouse click. A code snippet, preferably jQuery, can help to, if there is no such specialized effect library for it.
我不确定我是否需要开始另一个主题,但谁能帮助我使用一个小的 jQuery 片段来实现 Makr UI 的整体效果?
Im not sure if i need to start another topic, but can anyone help me with a small jQuery snippet to achieve the whole effect of the Makr UI?
推荐答案
您可以使用 jQuery 为页面的滚动顶部设置动画.
You can animate the scrolltop of the page with jQuery.
$('html, body').animate({
scrollTop: $(".middle").offset().top
}, 2000);
请参阅此网站:http://papermashup.com/jquery-page-scrolling/
这篇关于jQuery 动画滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!