我想更改滚动条的颜色。为了创建滚动条,我使用了给定的代码。
javascript 是
$('.scroll-pane').jScrollPane();
$('#body').bind(
'jsp-scroll-y',
function (event, scrollPositionY, isAtTop, isAtBottom) {
console.log('#pane1 Handle jsp-scroll-y', this,
'scrollPositionY=', scrollPositionY,
'isAtTop=', isAtTop,
'isAtBottom=', isAtBottom);
}
);
CSS 是
.scroll-pane
{
width: 100%;
height: 300px;
overflow: auto;
}
但是这里我不能改变滚动条的颜色。我该如何改变颜色呢? Demo
最佳答案
这两个元素基本上是滚动条和拖动处理程序。
.jspTrack {
background: lightgray !important;
}
.jspDrag {
background: gray !important;
}
编辑:真正确保应用颜色。
关于javascript - 如何改变滚动条的颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15900948/