2013-04-10 129 views
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; 
} 

回答

1

我不是,如果你能真正确定。但您可以使用文本框,按钮和div在您点击按钮后打开自己的下拉列表。通过这种方式,你可以自定义下拉列表中的每一件东西,甚至是下拉的内容,你可以在网上搜索有大量的样本,你可以使用其中之一