当光标在滚动条上移动时,jquery nicescroll增加滚动条的宽度

时间:2013-05-26 20:27:20

标签: jquery facebook scrollbar nicescroll

我正在使用nicescroll插件。 http://areaaperta.com/nicescroll/

在Facebook中,当光标在滚动条上移动时,滚动条的宽度会增加。当光标向后移动时,滚动条的宽度返回默认宽度。我们怎么能这样做?

2 个答案:

答案 0 :(得分:5)

虽然,这个问题很老了。但是,对其他人可能有所帮助:

jQuery('html').niceScroll({cursorborder:"",cursorcolor:"#333333",cursorwidth:"8px", boxzoom:true, autohidemode:false});

答案 1 :(得分:1)

我在任何地方都找不到合适的答案,所以我让自己发布我的解决方案:

.nicescroll-cursors	{
	-webkit-transition: width 0.15s ease-in-out;
	-moz-transition: width 0.15s ease-in-out;
	-ms-transition: width 0.15s ease-in-out;
	-o-transition: width 0.15s ease-in-out;
	transition: width 0.15s ease-in-out;
}
.nicescroll-cursors:hover,
.nicescroll-cursors:active	{
	width: 18px !important;
}