5
我有任务来更改滚动条的颜色。为此我使用jscrollpane.By这样做只有浏览器滚动更改。我想要更改下拉列表的颜色我也可以这样做吗? HTML是如何更改滚动条的颜色
<div class='columnLeft'>
<div class="labels w110">
<label>Country</label>
</div>
<div class="controls hello" id="hello">
@Html.DropDownList("ddlReCountry", null, new { @onchange = "onReBindCountry()", @class = "dropdown w325" })
</div>
</div>
JavaScript是
$(function() {
$('.hello ').jScrollPane();
$('#hello').bind(
'jsp-scroll-y',
function (event, scrollPositionY, isAtTop, isAtBottom) {
console.log('#pane1 Handle jsp-scroll-y', this,
'scrollPositionY=', scrollPositionY,
'isAtTop=', isAtTop,
'isAtBottom=', isAtBottom);
});
});
CSS是
.jspTrack {
background: lightgray !important;
}
.jspDrag {
background: gray !important;
}