https://www.hangge.com/blog/cache/detail_1931.html
?
使用:
需要引入jQuery插件和?jquery.nicescroll.js插件
修改滾動條:
$("#thecondMenu_container").niceScroll({
cursorcolor: "#b3b3b3",
background: "#eee",
cursorwidth: 8,
autohidemode: false
});
?
?
隱藏滾動條:
$(
"#div1"
).getNiceScroll().hide();
滾動到某個指定位置:
$(
"#div1"
).getNiceScroll(0).doScrollLeft(100);
?
配置參數:
touchbehavior:
true
,? ? ? ?
//是否是觸摸式滾動效果
cursorcolor:
"#333"
,?????
//滾動條的顏色值
cursoropacitymax:0.6,? ? ?
//滾動條的透明度值
cursorwidth:20,? ? ? ? ?
//滾動條的寬度值
background:
"#00F"
,? ? ? ?
//滾動條的背景色,默認是透明的
autohidemode:
true
,?????
//滾動條是否是自動隱藏,默認值為 true
?