9
我用下面的代碼定製我的選擇下拉箭頭:定製選擇的下拉箭頭,不可點擊
HTML:
<span class="selectWrapper">
<select id="rowselect" class="pageinfoselect input-mini">
<option>...</option>
</select>
</span>
CSS:
span.selectWrapper {
position: relative;
display: inline-block;
width:65px;
}
span.selectWrapper select {
display: inline-block;
padding: 4px 3px 3px 5px;
margin: 0;
font: inherit;
outline:none; /* remove focus ring from Webkit */
line-height: 1.2;
background: #f5f5f5;
height:30px;
color:#666666;
border:1px solid #dddddd;
}
/* Select arrow styling */
span.selectWrapper:after {
content: url("../images/arrow_down.png");
position: absolute;
top: 0;
right: 0;
bottom: 0;
line-height: 30px;
padding: 0 7px;
background: #f5f5f5;
color: white;
border:1px solid #dddddd;
border-left:0px;
}
這工作正常,並替換默認的下拉箭頭,但問題是,箭頭圖像不可點擊。如果我點擊選擇框它打開,但我希望它打開,當我點擊箭頭圖像以及
我應該在哪裏添加此? –
span.selectWrapper:課後 – Danield
工作很好,謝謝! –