清除Css中select的下拉式箭頭樣式

來源:互聯網
上載者:User

清除Css中select的下拉式箭頭樣式

select {
/*Chrome和Firefox裡面的邊框是不一樣的,所以複寫了一下*/
border: solid 1px #000;

/*很關鍵:將預設的select選擇框樣式清除*/
appearance:none;
-moz-appearance:none;
-webkit-appearance:none;

/*在選擇框的最右側中間顯示小箭頭圖片*/
background: url("http://ourjs.github.io/static/2015/arrow.png")no-repeat scroll right center transparent;


/*為下拉小箭頭留出一點位置,避免被文字覆蓋*/
padding-right: 14px;
}


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

目前做到的是這樣的,背景還沒想到怎麼去掉

 

 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.