internet-explorer - IE8 : CSS opacity filter results font color to become the same as the background div's background color

标签 internet-explorer css filter

我遇到了一个非常奇怪的错误:有一个 div (#inner) 放在另一个 (#container) 中。如果我在 IE8 中为内部元素设置不透明度,内部 div (#inner) 的字体颜色将与外部 (#container) 元素的背景颜色相同。

有没有人以前遇到过这种行为?

CSS 有问题的站点:http://beta.sminktanfolyamok.hu

这些部分的 CSS 部分:

div#container {
    width: 940px;
    margin-left: auto;
    margin-right:auto;
    border:1px solid #ccc;
    box-shadow: 3px 3px 10px rgba(10,10,10,0.4);
    -moz-box-shadow: 3px 3px 10px rgba(10,10,10,0.4);
    -khtml-box-shadow: 3px 3px 10px rgba(10,10,10,0.4);
    -webkit-box-shadow: 3px 3px 10px rgba(10,10,10,0.4);
    position:relative;
    padding-left:10px;
    padding-right:10px;
    padding-top:1em;
    background-image:url('images/navigation.jpg');
    background-repeat:no-repeat;
    background-position:center left;
    background-color: #000;
}

div#inner {
    background-color: #999;
    color:#222;
    opacity: 0.7;
    -moz-opacity: 0.7;
    -khtml-opacity: 0.7;
    -webkit-opacity: 0.7;
    filter:alpha(opacity=70);
}

最佳答案

解决方案与 ClearType 错误相同:我添加了

 position:relative

到所有相关层,问题就解决了。

关于internet-explorer - IE8 : CSS opacity filter results font color to become the same as the background div's background color,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7243347/

相关文章:

internet-explorer - 如何使用 WebBrowser 控件禁用 VB6 中的缓存?

CSS HasLayout IE7 错误 - 尝试隐藏缩放和溢出

html - SCSS中自动计算旋转度数将多个元素从0度旋转到180度

php - Wordpress 中的 Animate.css

html - 如何使用 CSS 将标题 (h2) 移动到图形和图像下方?

基于特定键的 angularjs 过滤器(精确匹配)

javascript - es6 通过过滤对象数组过滤对象数组

internet-explorer - Karma 无法在 64 位 Windows 上捕获 Internet Explorer 10

css - 如何破解不受支持的 mix-blend-mode CSS 属性?

php - 搜索在 laravel 中不起作用