码迷,mamicode.com
首页 > 其他好文 > 详细

IE9+ BUG汇总

时间:2015-06-15 18:31:51      阅读:105      评论:0      收藏:0      [点我收藏+]

标签:

CSS透明没有继承 css opacity is not inherited in internet explorer

今儿遇到一个问题源于同事写的一个页面,发现父级明明 opacity:0 了,但子级还显示,原来是 IE9+ 的一个 BUG;影响版本: IE9/IE10/IE11

解决方案,请参考:http://makandracards.com/makandra/21779-css-opacity-is-not-inherited-in-internet-explorer

Elements will not inherit their parent’s opacity in IE for no good reason. This can lead to unexpected behaviour when you want to fade/hide an element and all its children.

To fix it, give the element defining the opacity a non-static positioning. For example:

 
.foo {
  opacity: 0.2;
  position: relative; // for IE
}

While the linked article describes this problem for IE9 and below, I have encountered the same issue in IE10 and IE11.

Just go away, Internet Explorer!

IE9+ BUG汇总

标签:

原文地址:http://www.cnblogs.com/linr/p/4578594.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!