select选择框去掉默认的下拉箭头

select下拉框有一个下拉箭头样式,可以使用appearance-ms-expand去掉这个样式。

代码如下:

.not-arrow{

padding: 5px 10px;

border:1px solid #dcd8d8;

-webkit-appearance:none;

-moz-appearance:none;

appearance:none; /*去掉下拉箭头*/

/*在选择框的最右侧中间显示小箭头图片*/
background: url("http://ourjs.github.io/static/2015/arrow.png") no-repeat scroll right center transparent;

}

/*清除ie的默认选择框样式清除,隐藏下拉箭头*/

.not-arrow::-ms-expand { display: none; }

posted @ 2019-06-27 11:40  星空飘渺  阅读(15705)  评论(0编辑  收藏  举报