当前位置:Gxlcms > html代码 > css清除select的下拉箭头样式

css清除select的下拉箭头样式

时间:2021-07-01 10:21:17 帮助过:34人阅读

  1. <span style="color: #000000;">select {
  2. /*Chrome和Firefox里面的边框是不一样的,所以复写了一下*/
  3. border: solid 1px #000;
  4. /*很关键:将默认的select选择框样式清除*/
  5. appearance:none;
  6. -moz-appearance:none;
  7. -webkit-appearance:none;
  8. /*在选择框的最右侧中间显示小箭头图片*/
  9. background: url("http://ourjs.github.io/static/2015/arrow.png") no-repeat scroll right center transparent;
  10. /*为下拉小箭头留出一点位置,避免被文字覆盖*/
  11. padding-right: 14px;
  12. }
  13. /*清除ie的默认选择框样式清除,隐藏下拉箭头*/
  14. select::-ms-expand { display: none; }</span>

人气教程排行