1, ie conditional annotation method, Microsoft official recommended hack way.
Effective only under IE<!--[If ie]>
This text is only displayed on IE browser
<! [endif]-->
Only takes effect under the IE6.<!--[if IE 6]>
This text is only displayed on the IE6 browser.
<! [endif]-->
Only valid for versions above IE6<!--[if GT IE 6]>
This text is only displayed on the IE6 or above version of IE browser.
<! [endif]-->
is not effective on IE7.<!--[if! IE 7]>
This text is displayed on a non-IE7 browser
<! [endif]-->
Non-IE browser effective<!--[if! ie]><!-->
This text is only displayed on non-IE browsers
<!--<! [endif]-->
Read this article CSS hack summary, suddenly remembered, for a long time did not write CSS, are quick to hack the way to forget, re-review:
_ Only valid for IE6
* Only for IE6, IE7 effective
- "\9″ only takes effect under IE6/IE7/IE8/IE9/IE10.
- "Ie8/ie9/ie10" only takes effect under the
- "\9\0" only takes effect under IE9/IE10.
- Currently, if you need only hack for IE8, you can first use the "\9\0" that is in effect in Ie8/ie9/ie10, and then use the style that precedes the hack that is only ie9/ie10 effective.
Such as
selector {
color:#F00\0; /* Only for Ie8&ie9&ie10 * /
color:#000\9\0/* only forIe9&ie10 * /
}
< reprinted from:http://blog.csdn.net/liuxiaoyue909/article/details/8471422>
CSS Hack Summary