返回首页当前位置:首页 >> 网站建设 >> 正文

对IE6 IE7 IE8 FF2的CSS hack

文章来自: | 发表时间:2008-3-17 9:32:38

对IE6 IE7 IE8 FF2的CSS hack

* html  p {color:#f00;}            支持 IE6        不支持FF IE7 IE8b

*+html p {color:#f00;}            支持 IE7 IE8b        不支持FF IE6

p {*color:#f00;}            支持 IE7 IE6        不支持FF IE8

原有 IE 的 list-item whitespace bug 在 IE8 中依旧存在。
原有 IE 的 z-index bug 在 IE8 中依旧存在。
IE8 中产生新的 bug:当 line-heigth 小于正常值时,超出的部分将被裁切掉。
IE8 中依然不支持 display:table 。
IE8 中依然不支持 border 的 transparent 值。
IE8 中 @import 只支持三层嵌套。

只针对IE8的hack:
可以是属性
p{ color:green;/*/color:#1e90ff;*/ }
也可以是类
/*/p{ color:#1e90ff}*/

感觉ie8和Opera比较类似