0
我想用圖像而不是這個惱人的箭頭來製作自定義下拉列表 因此,在這個論壇有人建議將選擇包裝在一個較小的div。所以一切正常。 問題在於選擇。我如何使transperent背景突出顯示下拉列表
當我選擇一個選項時,您知道藍色背景突出顯示,表示所選元素,即使選擇了元素,問題仍然存在,此突出顯示保留覆蓋我的圖像箭頭。
我怎樣才能解決這個
我試圖使用選擇選擇啓用,但什麼都沒有發生!
.styled-select select option ::selection {
background:#fff;
}
這裏是我的代碼: HTML
<div class="styled-select">
<select>
<option>Here is the first option</option>
<option>The second option</option>
</select>
</div>
CSS: -
.styled-select select {
background: transparent;
width: 268px;
padding: 5px;
border: 0;
border-radius: 0;
height: 34px;
line-height: 1;
-webkit-appearance: none;
}
.styled-select {
width: 240px;
height: 34px;
overflow: hidden;
background: url(file:///C:/Users/gismo2/Pictures/fancy_nav_down.jpg) no-repeat right ;
border: 1px solid #ccc;
}