测试环境:IE6 , IE7, IE8, FF3.0
表达方式:表达方式:
body { `background:red }
body { ~background:red }
body { !background:red }
body { @background:red }
body { #background:red }
body { $background:red }
body { %background:red }
body { ^background:red }
body { &background:red }
body { *background:red }
body { (background:red }
body { )background:red }
body { =background:red }
body { +background:red }
body { [background:red }
body { ]background:red }
body { {background:red }
body { |background:red }
body { ,background:red }
body { <background:red }
body { .background:red }
body { >background:red }
body { /background:red }
body { ?background:red }
结论:IE识别所有CSS Hack 结论:IE识别所有CSS Hack
比如我们要实现在IE 中480px 的宽度,而在其他浏览器500px 的宽度,就可以通过Hack 来完成,如下:比如我们要实现在IE中480px的宽度,而在其他浏览器500px的宽度,就可以通过Hack来完成,如下:
#hack {
width : 500px;
+width : 480px; /*only IE*/
}