Tôi Tring để thay đổi tốc độ di chuyển mặc định, số lượng và quán tính của một webpage.I google rất nhiều, nhưng vô íchLàm thế nào để thay đổi scrollspeed mặc định, scrollamount, scrollinertia của một trang web
May mắn thay, sau đó, này ngày, tôi tìm thấy a plugin cho phép chúng tôi thay đổi tốc độ cuộn, số lượng, quán tính CHỈ CÓ một thẻ div cụ thể và không phải trong toàn bộ trang web.
Đây là một mã cơ bản
$(".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>
Vấn đề là tôi muốn cho toàn bộ trang và không chỉ đơn thuần là một withing đặc biệt div element.Any trợ giúp sẽ được appreciated.Please giúp tôi
Cảm ơn trước
những gì bạn có ý nghĩa bởi "số lượng và quán tính" –
Hãy thử di chuyển ở đây, http : //manos.malihu.gr/tuts/custom-scrollbar-plugin/multiple_scrollbars_example.html Đây là quán tính. Scrollamount là số tiền /%/pixel được cuộn mỗi khi bạn cuộn. Số lượng cuộn nhiều hơn, cuộn nhiều hơn (có một đường mỏng khác nhau giữa scrollamount và tốc độ cuộn) – Michel
tôi không thể giải thích, quán tính chính xác có nghĩa là gì, ........ đây là ví dụ http://www.loisjeans.com/web2012/es Khi u cuộn, cuộn trang, các phần tử di chuyển lên trên và dừng chậm. – Michel