[英]Is there a JQuery plugin that lets the browser scroll down to 200 pixels from the current position, smoothly?
該插件應使滾動條從當前位置下降200像素。 但是很流暢,也很酷,但又不過分。
您不需要為此使用插件,只需使用jQuery的.animate()
:
$(window).animate({scrollTop: '+=200'}, 2000);
您可以用
擁有滾動條的
任何元素/節點替換window
。 具有可滾動的內容。
參考: .animate()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.