只针对ie6,ie7和firefox的csshack
只针对ie6,ie7和firefox的csshack
注意都要写在正常样式的后边,除!important方法在前边
---------------针对样式名------------
如果只让ie6看见用*html .head{color:#000;} !!!!无法通过验证!!!!
如果只让ie7看见用*+html .head{color:#000;} 通过验证
如果只让ff看见用html>/**/body .head{color:#000;} 通过验证 或者:root body .head{color:#000;} !!!!无法通过验证!!!!
如果只是不让ie6看见用html>body .head{color:#000;} 通过验证
如果只是不让ie7看见无
如果只是不让ff看见用*body .head{color:#000;} !!!!无法通过验证!!!!
-------------针对具体属性--------------
如果只让ie6看见用_ .head{_color:#000;} !!!!无法通过验证!!!!
如果只让ie7看见用*与important结合的方法: .head{*color:#000;!important; color:#000;} !!!!无法通过验证!!!!
如果只让ff看见无
如果只是不让ie6看见用 /**/ .head{color /**/:#000;} 或者用!important,写法: width:20px!important; width:50px; 通过验证
如果只是不让ie7看见无
如果只是不让ff看见用*或者+ .head{*color:#000; +color:#000;} !!!!无法通过验证!!!!
总结出能够通过验证的有
如果只让ie7看见用*+html .head{color:#000;} 通过验证
如果只让ff看见用html>/**/body .head{color:#000;} 通过验证
如果只是不让ie6看见用html>body .head{color:#000;} 通过验证
如果只是不让ie6看见用 /**/ .head{color /**/:#000;} 或者用!important写法: width:20px!important; width:50px; 通过验证
在结构里写如下css专门针对ie6 通过验证
<!--[if lte IE 6]>
<link href="css/rentcar_ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->