如何在同一表达式中为IE6和IE7破解CSS?(如果可能,则为corse)
-编辑-
我是说,
* html #div{ //hacks ie6}
*+html #div { //hacks ie7}
一个类似的表达式可以同时破解这两个问题吗?
-编辑2-
例如,这段内联代码HTML
<!--[if IE lte 7]>
<style type="text/css">
.contButton p a{ height:25px; width:auto; }
.contButton p a span{ height:25px;width:auto; }
</style>
<![endif]-->
只会影响IE7或更低版本,如何在CSS中选择?
示例:-*?? #div { //the CSS properties here will affect to IE6 and IE7 }
发布于 2011-08-24 20:18:53
<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" media="all" href="ie_fixes.css" />
<![endif]-->
.example_class {
*background-color: #ffffff;
}
发布于 2011-08-24 20:11:39
改用conditional comments,这样你的“黑客”CSS就和你的“现代浏览器”CSS分开了:
<!--[if IE 7]>
<style type="text/css" src="ie7styles.css" />
<![endif]-->
https://stackoverflow.com/questions/7174905
复制相似问题