我制作了网页,并使用CSS3(渐变,图像边框,文本阴影等)设置了样式。我们的工作浏览器(IE9)完全破坏了它的外观。请不要知道如何解决css,当浏览器低于IE10时,不要使用这套样式但这套样式?非常感谢:)
答案 0 :(得分:2)
有不同的解决方案。
例如:
<!--[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]-->
IE8或更低版本:要专门针对IE8或更低版本编写CSS规则,请在分号前添加反斜杠和9(\ 9)。 IE7或以下:在CSS属性前添加星号(*)。 IE6:在属性前添加下划线(_)。
例如:
.box {
background: gray; /* standard */
background: pink\9; /* IE 8 and below */
*background: green; /* IE 7 and below */
_background: blue; /* IE 6 */
}
答案 1 :(得分:1)
您可以使用此条件语句
进行修复<!--[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);
}
渐变可以应用为
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#000000');
IE不支持 border-image 属性,请检查:this
您可以使用css3pie在IE 6-9中使用边框图像