select下拉框有一個下拉箭頭樣式,可以使用appearance與-ms-expand去掉這個樣式。
代碼如下:
.not-arrow{
padding: 5px 10px;
border:1px solid #dcd8d8;
-webkit-appearance:none;
-moz-appearance:none;
appearance:none; /*去掉下拉箭頭*/
/*在選擇框的最右側中間顯示小箭頭圖片*/
background: url("http://ourjs.github.io/static/2015/arrow.png") no-repeat scroll right center transparent;
}
/*清除ie的默認選擇框樣式清除,隱藏下拉箭頭*/
.not-arrow::-ms-expand { display: none; }