【发布时间】:2014-12-31 05:36:24
【问题描述】:
我正在尝试让我的网站在 ie8 上运行,我最初拥有的是 background-color:rgba(4, 4, 4, 0.8); - 这在其他浏览器上按预期工作,不幸的是 ie8 不适用于此,所以我使用下面的 css。 - 有谁知道如何避免子元素从父元素继承不透明度?
非常感谢。
我做了一个小提琴,但当我在 ie8 http://jsfiddle.net/up3uusxf/2/987654321@ 中打开它时似乎崩溃了
<div id="overlay-modal">
<div class="inner-modal">
<p>Content in here</p>
</div>
</div>
#overlay-modal
{
display:none;
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
background-color:black;
filter: alpha(opacity=80);
opacity: 0.8;
z-index:999;
}
.inner-modal
{
width: 400px;
/*height: 270px;*/
margin: 200px auto;
background-color: white;
}
【问题讨论】:
-
jsFiddle 编辑器在 IE8 中不起作用。您应该能够通过转到jsfiddle.net/up3uusxf/2/show 来查看输出
-
@lgupta 我看到了这就是为什么我提到它的 ie8,ie8 不支持 rgba
-
@user7167 那里有一些解决方案。检查第二个答案,如果它不起作用使用图像支持ie8。
标签: html css internet-explorer internet-explorer-8