改变select默认的样式,一般情路情况下通过ul,li来模拟来实现。 <div class="select_style"> <select name="select"> <option>AAAAAAAAAAA</option> <option>BBBBBBBBBBB</option> <option selected>CCCCCCCCCCC</option> <option>DDDDDDDDDDD</option> </select> </div>
.select_style {width:240px; height:30px; overflow:hidden; background:url(../images/arrow.webp) no-repeat 215px; border:1px solid #ccc; -moz-border-radius: 5px; /* Gecko browsers */ -webkit-border-radius: 5px; /* Webkit browsers */ border-radius:5px; } .select_style select { padding:5px; background:transparent; width:268px; font-size: 16px; border:none; height:30px; -webkit-appearance: none; /*for Webkit browsers*/ } |