How to slow down scrolling speed with Javascript?

2019-06-07 21:28发布

When I scroll some litlle div with many elements, my mouse scrolling is too fast so I can't see few elements.

2条回答
看我几分像从前
2楼-- · 2019-06-07 22:14

You can use NiceScroll plugin with jQuery:

$(document).ready(function() { 

    $("html").niceScroll();

  }

);

Or jQuery.scrollSpeed plugin.

查看更多
霸刀☆藐视天下
3楼-- · 2019-06-07 22:18

Scroll speed can't be altered as they are System configurations and Javascript shouldn't be allowed to alter a user's own settings.

But there are a lot of jquery custom scrollbars that you can use, which offer an option to change the scroll speed. Examples: mCustomScrollbar, jquery slimscroll etc

查看更多
登录 后发表回答