目标IE9只通过CSS [英] Target IE9 Only via CSS
本文介绍了目标IE9只通过CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
只是想知道这些IE的黑客在我的包技巧
Just wondering given these IE hacks in my bag of tricks
"\9" - for IE8 and below.
"*" - for IE7 and below.
"_" - for IE6.
例如
body {
border:2px solid blue;
border:2px solid yellow \9;
*border:2px solid green;
_border:2px solid orange;
}
是否有人对IE9有这样的攻击?即我试图仅通过CSS定位IE9?
Whether anyone has such a hack for IE9 ? i.e. I'm trying to target IE9 only via CSS ?
推荐答案
我建议使用 condcoms 来提供IE9 css文件或有条件html类,类似于:
I suggest using condcoms to feed an IE9 css file or have a conditional html class, similar to:
<!--[if lt IE 7]> <html lang="en-us" class="no-js ie6"> <![endif]-->
<!--[if IE 7]> <html lang="en-us" class="no-js ie7"> <![endif]-->
<!--[if IE 8]> <html lang="en-us" class="no-js ie8"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en-us" class="no-js"> <!--<![endif]-->
这篇关于目标IE9只通过CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文