如何针对某些情况(如Internet Explorer特定的CSS或特定于Internet Explorer的JavaScript代码)仅定位Internet Explorer 10?
我试过这个,但它不起作用:
<!--[if IE 10]> <html class="no-js ie10" lang="en"> <![endif]-->
<!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
Run Code Online (Sandbox Code Playgroud)
Internet Explorer 10忽略条件注释并使用<html lang="en" class="no-js">而不是<html class="no-js ie10" lang="en">.
html javascript css conditional-comments internet-explorer-10
以下是这个答案/sf/answers/1239962741/
我尝试实现相同的解决方案,但它在我的Windows 7 Firefox 22上不起作用,这就是我得到的:

select {
-moz-appearance: window;
-webkit-appearance: none;
background: #f5f5f5 url("/images/arrow_down.png") right center no-repeat;
padding-right: 20px;
}
@-moz-document url-prefix() {
.wrapper {
background: #f5f5f5 url("/images/arrow_down.png") right center no-repeat;
padding-right: 20px;
}
}
Run Code Online (Sandbox Code Playgroud)
编辑:这是一个jsfiddle http://jsfiddle.net/TGBEZ/1/