ie,火狐,谷歌 select清除默認樣式 設置新的樣式


select {

  border: solid 1px #000;  

      /*Chrome和Firefox里面的邊框是不一樣的,所以復寫了一下*/

  appearance:none; -moz-appearance:none; -webkit-appearance:none;  

      /*很關鍵:將默認的select選擇框樣式清除*/

  background: url("http://ourjs.github.io/static/2015/arrow.png") no-repeat scroll right center transparent;  

      /*在選擇框的最右側中間顯示小箭頭圖片*/

  padding-right: 14px;  

      /*為下拉小箭頭留出一點位置,避免被文字覆蓋*/

}

select::-ms-expand { display: none; }  /*清除ie的默認選擇框樣式清除,隱藏下拉箭頭*/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM