CSS Hack: 区分 IE6 / IE7 /IE8 /Firefox

今天又遇到CSS问题了,还是那个Flash遮罩层错位,ie8和Firefox下正常,ie6也正常,就ie7错位了,没办法,偷个懒,用了CSS hack。为了一句CSS写多一个文件,或者在header上添加注释,那显然不是懒人的习惯做法。
selector{
property:value; /* 所有浏览器 */
property:value\9; /* 所有IE浏览器 */
+property:value; /* IE7 */
_property:value; /* IE6 */
}
<p class="ie">
<span style="display:block;display:none\9;">嘿嘿,小子竟然也用Firefox,蓝色文字。</span>
<!--[if IE 8]>不错不错,挺先进的嘛,使用IE8呢!文字是褐色的。<![endif]-->
<!--[if IE 7]>你,IE7,红色文字!<![endif]-->
<!--[if IE 6]>孩子,虽然显示的是绿色文字,不过,IE6可不是好东西呢!<![endif]-->
</p>
这里有类似的文章:1.只用4个字符区分IE6,IE7和IE8