How to Make Select Element be Transparent in Chrome?

后端 未结 1 700
挽巷
挽巷 2020-12-03 01:26

Please look this example:



        
相关标签:
1条回答
  • 2020-12-03 01:55

    select {
      width:192px;
      padding:2px;
      border:none;
      background:url(http://imgur.com/MJyZM.png) 0 0 no-repeat;
      -webkit-appearance: none;
    }
    <select>
      <option value="abcdefg">abcdefg</option>
      <option value="1234567">1234567</option>
      <option value="abcdefg">abcdefg</option>
    </select>

    Not tested on firefox but it seems -webkit-appearance: none; disables specific behaviours webkit can apply.

    0 讨论(0)
提交回复
热议问题