css - IE8 中的不透明度不起作用

标签 css internet-explorer internet-explorer-8 opacity

我已经设置了覆盖层的不透明度,该覆盖层在 FF、Chrome、Safari 和 IE9 中工作正常,但在 IE8 中不起作用。我用谷歌搜索了很多,但没有找到任何解决方案。

我的CSS代码是

#overlayEffectDiv { 
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
    width: 100%;
    height: 100%;
    filter: alpha(opacity = 50);
    -moz-opacity: 0.5;
    -khtml-opacity: 0.5;
    opacity: 0.50;
    background: #000;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3000;
    /* hide it by default */
    display: none;
}

在 FF 中如下所示:

enter image description here

但在 IE8 中它看起来如下:

enter image description here

最佳答案

找到解决方案here 。不透明度不是问题我做了一些调试,发现它在 ie8 上工作正常,问题出在 jquery fadeIn 和 fadeOut 上。 jQuery fadeIn 使半透明背景变成纯色。

感谢所有提供帮助的人。

关于css - IE8 中的不透明度不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10296204/

相关文章:

c# - 禁用按钮文本在 IE 中变灰

c++ - 从 IE 扩展检测网页中的滚动

CSS - 为什么我的背景颜色没有在 IE 中显示?

css - 为什么在xhtml strict 的h1 元素中不允许出现段落元素?

javascript - 使用变量和 getElementById 和 getElementsByTagName 将 SRC 替换为 javascript

html - 如何限制一个div停留在另一个2 div的底部

css - IE7 和 IE8 的最后一个 child 和第 n 个 child

css - google chrome for mac定位头痛

javascript - 在 IE 中需要双击打开下拉菜单,在 Chrome 中工作正常

ajax - IE8 在 ajax Coldfusion 中的预期标识符、字符串或数字