我正在使用 nicescroll 插件。http://areaaperta.com/nicescroll/
在 facebook 中,当光标移动到滚动条上时,滚动条的宽度会增加。当光标向后移动时,滚动条的宽度返回默认宽度。我们怎么能这样呢?
我正在使用 nicescroll 插件。http://areaaperta.com/nicescroll/
在 facebook 中,当光标移动到滚动条上时,滚动条的宽度会增加。当光标向后移动时,滚动条的宽度返回默认宽度。我们怎么能这样呢?
虽然,这个问题已经很老了。但是,可能对其他人有帮助:
jQuery('html').niceScroll({cursorborder:"",cursorcolor:"#333333",cursorwidth:"8px", boxzoom:true, autohidemode:false});
我没有在任何地方找到正确的答案,所以我让自己发布我的解决方案:
.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;
}