[英]How can I change the color of scroll bar
我有任务来改变滚动条的颜色。为此,我使用了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;
}
我不确定你是否可以。 但您可以使用单击按钮后打开的文本框,按钮和div来构建自己的下拉列表。 通过这种方式你可以自定义下拉列表中的每一个东西,甚至下拉的内容,你可以在网上搜索有大量样本这样的approch你可以使用其中一个
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.