-1

interncup-thc.ucoz.com

Under Brackets, around the text it should have been a green shadow which on chrome/firefox displays but on IE doesn't. I have IE 10

What's wrong? trying to fix this for one day already.

4

1 回答 1

1

您将不得不更改您的 HTML,以便它检测它是否是 IE 并根据需要应用相应的类。它将为您的 CSS 添加更多内容,但对于 IE 兼容性来说,这将是必需的。

如果你想覆盖所有版本的 IE 然后你会做如下的事情:

用这个替换你的<body>标签:

<!--[if lt IE 7 ]><body class="ie6"><![endif]-->
<!--[if IE 7 ]><body class="ie7"><![endif]-->
<!--[if IE 8 ]><body class="ie8"><![endif]-->
<!--[if IE 9 ]><body class="ie9"><![endif]-->
<!--[if (gt IE 9) ]> <body class="modern"><![endif]-->
<!--[!(IE)]><!--><body class="notIE modern"> <!--<![endif]-->

例如,您将申请:

body.ie6 #box,
body.ie7 #box,
ody.ie8 #box {
/* This contains the color of the shadow in the CSS3 syntax */
    background: #cccccc;

 /* This contains the blur-radius in the CSS3 syntax */
zoom: 1;
filter:progid:DXImageTransform.Microsoft.Blur(PixelRadius=5);

  /* You must remove the border in IE, since it will be replaced in the next rule */
border: none;

这是关于如何在没有 JavaScript 的情况下在 IE6-8 中模拟 CSS3 盒子阴影的非常好的参考资料。

于 2013-05-09T19:48:40.080 回答