滚动条插件nicescroll的使用
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

浙公网安备 33010602011771号