IE下拉列表的样式默认修改
所有浏览器默认的下拉列表的样式都不太好看,在页面设计时,基本都会对默认样式做修改。我使用谷歌浏览器时,只修改了很简单颜色和边框就达到了效果。
width: 100px;
outline: none;
border: 1px solid rgba(51,170,255,.5);
background: transparent;
color: #cef;
但是到了IE上就发现效果不行。
为了兼容IE,只能换用别的方法。我这里是兼容的IE11.
select{
width: 100px;
/* 清除select聚焦时候的边框颜色 */
outline: none;
border: 1px solid rgba(51, 170, 255, 0.5);
background: transparent;
color: rgba(204, 238, 255, 1);
line-height: 18px;
padding: 0 5px;
/*很关键:将默认的select选择框样式清除, 去掉默认的下拉三角*/
appearance:none;
-moz-ap