嵌套元素中的 IE 不透明度问题
有人找到解决方案吗? http://seanmonstar.com/post/709013028/ie-opacity-ignores -positioned-children
我已经搜索了几个小时但找不到解决方案。我知道 filter:inherit 有效,但我实际上需要过滤器为嵌套元素之一提供不透明度......
Has anybody found a solution for this ? http://seanmonstar.com/post/709013028/ie-opacity-ignores-positioned-children
I’ve been searching for hours now and can’t find a fix. I know that filter:inherit works but I actually need the filter to give opacity to one of the nested elements…
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看一下这个似乎有效的示例: jsfiddle
所以我使用 jquery 来淡入淡出如果删除position:relative;会影响不透明度。来自#toggle_me;你会发现定位元素有问题,所以解决方案是使用position:relative;在父母身上。
同样在 jquery 代码区域中,您将看到 this.style.removeAttribute('filter');当 IE 淡出时,它会奇怪地阻止 IE 渲染文本。
Look at this example which seems to work: jsfiddle
So I'm using jquery to fade in and out which effects the opacity, if you remove position:relative; from #toggle_me; you'll find the positioned element has an issue, so the solution is to have position:relative; on the parent.
Also in the jquery area of code you'll see this.style.removeAttribute('filter'); that stops IE strangely rendering the text when it fades back up.