css - 如何在ie8中对同一个div同时使用阴影和不透明度

标签 css internet-explorer

我有以下代码,我在 iframe 中放置了一个用于阻止点击事件的链接。

 <div id="IframeWrapper" style="position: relative;">
    <div id="iframeBlocker"></div>
     <iframe  id="iframewebpage"  runat="server"></iframe>
    </div>

和 CSS

  #iframeBlocker {        
    background:none transparent ;
    background-color:White;
    bottom: 0px;
    color: White;      
    filter:alpha(opacity=10);
    opacity: 0.1;            
    display: block;            
    left: 0px;     
    position: absolute;
    right: 0px;
    top: 0px;      
    z-index: 1040;
     -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#000000')";
    }

我的问题是。我不能为我的 div 同时使用不透明度和阴影。如果我使用 css ie 代码来启用阴影,它不会采用不透明度。

在 IE 中对 div 同时使用阴影和不透明度的任何解决方法?

最佳答案

如果符合您的需要,可以尝试使用 rgba() 代替不透明度。

#iframeBlocker { 
   background:rgba(255, 255, 255, 0.1);   
}

关于css - 如何在ie8中对同一个div同时使用阴影和不透明度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18531805/

相关文章:

css - 如何为 IE 用户提供来自不同服务器的字体?

html - 将一个div分成三个垂直部分

html - 垂直居中 div - 浏览器兼容性

html - 功能区导航栏(Navbar) 襟翼 float 位置

javascript - 如何使用 react 编辑元素宽度

html - 如何在 HTML 和 CSS 中制作发光的文本

html - CSS 适用于 Chrome 但不适用于 IE

css - 将固定元素定位在 float 元素之上

html - IE 9 可以处理按钮标签的表单属性吗?

具有单个输入字段的表单的 jQuery 提交处理程序不会在 IE 上触发