Par*_*ris 74 css3 conditional-statements internet-explorer-10
所以,使用Mozilla和WebKit,我有一个不错的解决方案,用一个父元素替换select盒子上的箭头appearance: none;.
在大多数情况下,我禁用了此功能.对于IE10,我实际上无法禁用它,因为我的条件注释实际上不起作用.
这是我的标记:
<!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
<!--[if IE 7 ]> <html class="ie7"> <![endif]-->
<!--[if IE 8 ]> <html class="ie8"> <![endif]-->
<!--[if IE 9 ]> <html class="ie9"> <![endif]-->
<!--[if (gt IE 9)]> <html class="ie10plus"> <![endif]-->
<!--[if !(IE)]><!--> <html> <!--<![endif]-->
Run Code Online (Sandbox Code Playgroud)
该类ie10plus实际上并没有使它成为标记的方式.
我也觉得可能有合法的方法来替换IE中的箭头.我并不反对实际解决这个问题.appearance: none;但不起作用.那我该怎么办?
Sam*_*son 293
避免浏览器嗅探和条件注释(从Internet Explorer 10开始不支持),而是采用更标准的方法.对于此特定问题,您应该将::-ms-expand伪元素作为目标:
select::-ms-expand {
display: none;
}
Run Code Online (Sandbox Code Playgroud)