您的位置:首页 > Web前端 > CSS

清除Css中select的下拉箭头样式

2017-12-18 14:46 337 查看
清除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; }

目前做到的是这样的,背景还没想到怎么去掉

 

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  select css