我制作了网页,并使用CSS3 (渐变、图像边框、文本阴影等)设置样式。我们的工作浏览器(IE9)完全毁了它的外观。你不知道如何在css中修复当浏览器低于IE10时,不要使用这组样式而是使用这组样式吗?非常感谢:)
发布于 2014-05-27 17:42:36
有不同的解决方案。
1 "head“中的IE条件注释
例如:
<!--[if IE 8]>
<style type="text/css">
/* css for IE 8 */
</style>
<![endif]-->
<!--[if lt IE 8]>
<link href="ie7.css" rel="stylesheet" type="text/css" />
<![endif]-->2个特定于Explorer的CSS规则(IE CSS hacks)
IE8或更低版本:要将特定的CSS规则写入IE8或更低版本,请在分号前添加反斜杠和9 (\9)。CSS或更低版本:在IE7属性前添加星号(*)。IE6:在属性前添加下划线(_)。
例如:
.box {
background: gray; /* standard */
background: pink\9; /* IE 8 and below */
*background: green; /* IE 7 and below */
_background: blue; /* IE 6 */
}在我看来,第二个是最好的方法!
发布于 2014-05-27 17:38:47
您可以使用这个条件语句来修复它
<!--[if lte IE 9]>
// Your css for IE9 and below or
// Perhaps importing a specific style sheet as
<link rel="stylesheet" type="text/css" href="ie9_and_below.css" />
<![endif]-->您可以使用以下命令应用文本阴影
.shadow {
filter: progid:DXImageTransform.Microsoft.Shadow(color=#0000FF,direction=45);
}完整的documentation
gradient可以应用为
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#000000');IE不支持border-image属性,请检查:this
您可以使用css3pie在IE6-9中使用边框图像
https://stackoverflow.com/questions/23885862
复制相似问题