Rule for IE. Not working in IE 10

2019-05-28 11:14发布

问题:

I specified a rule for all IE versios, but its not working for some reason.

<!--[if IE]>
<style type="text/css">
#topmenu LI.fisrt {
    padding: 5px 5px !important;
    font: 13px/43px sans-serif !important;
    text-transform: uppercase;
}
</style>
<![endif]-->

回答1:

From MSDN:

Support for conditional comments has been removed in Internet Explorer 10 standards and quirks modes for improved interoperability and compliance with HTML5

The idea is that IE10 has much better standards support than older IE versions and there should no longer be any need to conditionally target it.