如何创建平滑的滚动效果?

Mic*_*ael 5 javascript css jquery html5

我在这个网站http://www.agileinfoways.com/上看到了很好的滚动效果,想知道如何实现.我以前从未见过它,我甚至不知道它叫什么.滚动几乎模仿UIScrollViewiOS平台上的一个.关于如何创建这个的任何建议都会有所帮助.谢谢

Вик*_*ков 1

该网站使用 NiceScroll JQuery 插件

插件 GitHub 页面 - https://github.com/inuyaksa/jquery.nicescroll

来自站点的初始化代码,您提供的内容:

if (jQuery().niceScroll) {
    $("html").niceScroll({
        scrollspeed: 70, 
        mousescrollstep: 38, 
        cursorwidth: 15, 
        cursorborder: 0, 
        cursorcolor: '#464646', 
        cursorborderradius: 0, 
        autohidemode: false, 
        horizrailenabled: false
    });
}
Run Code Online (Sandbox Code Playgroud)