【问题标题】:Is there a JQuery plugin that lets the browser scroll down to 200 pixels from the current position, smoothly?是否有一个 JQuery 插件可以让浏览器从当前位置平滑地向下滚动到 200 像素?
【发布时间】:2010-12-22 05:51:17
【问题描述】:

插件应该使滚动条从当前位置向下移动 200 像素。但是很流畅,也很酷,但不会太多。

【问题讨论】:

  • “也很酷,但不要太多”这是我接受的技术规范吗?

标签: javascript jquery css templates plugins


【解决方案1】:

你不需要为此目的的插件,只需使用 jQuery 的.animate()

$(window).animate({scrollTop: '+=200'}, 2000);

您可以将window 替换为拥有滚动条的任何元素/节点。有一个可滚动的内容。

参考:.animate()

示例:http://www.jsfiddle.net/4yUqL/28/

【讨论】:

    【解决方案2】:
    猜你喜欢
    • 2014-09-13
    • 1970-01-01
    • 2021-01-02
    • 2015-10-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-10-09
    • 2014-06-03
    相关资源
    最近更新 更多