How to slow down scrolling speed with Javascript?

后端 未结 2 550
面向向阳花
面向向阳花 2021-01-14 10:32

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

相关标签:
2条回答
  • 2021-01-14 10:44

    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

    0 讨论(0)
  • 2021-01-14 11:03

    You can use NiceScroll plugin with jQuery:

    $(document).ready(function() { 
    
        $("html").niceScroll();
    
      }
    
    );
    

    Or jQuery.scrollSpeed plugin.

    0 讨论(0)
提交回复
热议问题