我特林改变webpage.I的默认滚动速度,数量和惯性google了很多,但不成功如何更改默认scrollspeed,scrollamount,网页的scrollinertia
幸运的是,后来,这一天,我发现a plugin,它允许我们改变滚动速度,数量,惯性只在一个特定的div标签,而不是在整个网页。
这是一个基本的代码
$(".I-WILL-APPLY-ONLY HERE").mCustomScrollbar({
set_width:false,
set_height:false,
horizontalScroll:false,
scrollInertia:550,
SCROLLINERTIA:"easeOutCirc",
mouseWheel:"auto",
autoDraggerLength:true,
scrollButtons:{
enable:false,
scrollType:"continuous",
SCROLLSPEED:20,
SCROLLAMOUNT:40
},
advanced:{
updateOnBrowserResize:true,
updateOnContentResize:false,
autoExpandHorizontalScroll:false,
autoScrollOnFocus:true
},
callbacks:{
onScrollStart:function(){},
onScroll:function(){},
onTotalScroll:function(){},
onTotalScrollBack:function(){},
onTotalScrollOffset:0,
whileScrolling:false,
whileScrollingInterval:30
}
});
<div id="I-WILL-APPLY-ONLY HERE" class="I-WILL-APPLY-ONLY HERE">
A basic height in pixels would be defined for this element and any content appearing here will have a different scrollspeed,inertia.Mentioning heignt of this div element is compulsary,else i wont show the output </div>
的问题是,我想整个页面,而不是仅仅withing特定的div element.Any帮助将是appreciated.Please帮我
谢谢提前
全面例如什么叫“量和惯性” –
试试这里滚动,http表示://manos.malihu.gr/tuts/custom-scrollbar-plugin/multiple_scrollbars_example.html 这是惯性。 Scrollamount是每次滚动时滚动的数量/%/像素。 更多的滚动量,更多的滚动(滚动速度和滚动速度之间有一个细线的差异) – Michel
我无法真正解释,什么惯性正好意味着,........这里是一个例子 http:/ /当你滚动,页面滚动时,元素向上移动,并缓慢停止。 – Michel