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