select {
width: 100%;
height: 34px;
border: solid 1px #0086EA;
/*为下拉小箭头留出一点位置,避免被文字覆盖*/
padding-right:34px;
padding-left: 10px;
/*将默认的select选择框样式清除*/
appearance:none;
-moz-appearance:none;
-webkit-appearance:none;
background: url("/assets/img/caret.png") no-repeat scroll right center transparent;
}
/*清除ie的默认选择框样式清除,隐藏下拉箭头*/
select::-ms-expand { display: none; }

世语项目中使用,用图片做select背景。清除各个浏览器select的默认样式。

posted on 2017-01-09 14:31  顾五丑  阅读(8360)  评论(1编辑  收藏  举报