用纯css改变下拉列表select框的默认样式
html
<div id="parent"> <select> <option>what</option> <option>the</option> <option>hell</option> </select> </div>
css
#parent{ background: url('https://raw.githubusercontent.com/ourjs/static/gh-pages/2015/arrow.png') right center no-repeat; /* the width and the height of your image */ width: 100px; height: 30px; overflow: hidden; border: solid 1px #ccc; } #parent select{ -webkit-appearance:none; -moz-appearance:none; appearance:none; background:transparent; border:none; padding-left:10px; width: 120px; height:100%; }