我试图用我自己的图片替换选择箭头。我在包含相同大小的div中选择,我将选择的背景设置为透明,并且在div的右上角包含一张图片(与箭头大小相同)作为背景。选择箭头样式更改
它只适用于Chrome。
我怎样才能使它在Firefox和IE9工作,我得到这个地方:
.styled-select {
width: 100px;
height: 17px;
overflow: hidden;
overflow: -moz-hidden-unscrollable;
background: url(images/downarrow_blue.png) no-repeat right white;
border: 2px double red;
display: inline-block;
position: relative;
}
.styled-select select {
background: transparent;
-webkit-appearance: none;
width: 100px;
font-size: 11px;
border: 0;
height: 17px;
position: absolute;
left: 0;
top: 0;
}
body {
background-color: #333333;
color: #FFFFFF;
}
.block label {
color: white;
}
<HTML>
<HEAD>
</HEAD>
<BODY>
<p/>
<form action="/prepareUpdateCategoryList.do?forwardto=search">
<fieldset class="block" id="searchBlock">
<p>
<label style="width:80px">Class</label>
<div class="styled-select">
<select property="voucherCategoryClass">
\t \t <option value="0">Select </option>
\t \t <option value="7382">steam </option>
\t </select>
</div>
</p>
</fieldset>
</form>
</BODY>
</HTML>
它不起作用。 – user1802439
看看编辑。 – Morpheus
谢谢,解决方法解决了问题。 – user1802439