我有以下代码,我在 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/