问题描述
我的IE有问题。我有一个图层,使其具有透明和全屏的风格。
position:absolute;
top:0px;
left:0px;
right:0px;
bottom:0px;
background-color:#000000;
filter:alpha(opacity = 50);
-moz-opacity:0.5;
不透明度:0.5;
z-index:1;
我使用JQuery方法fadeIn和fadeOut来显示和隐藏它。
在Opera中很好的锁定很好,但IE7只是覆盖了这个风格,并将其设置为100%不透明。它甚至淡化了!
Peter-Paul Koch有一个。一般来说,quirksmode.org是我去解决浏览器兼容性问题的第一个地方; PPK做了大量的研究。也就是说,你看起来像你有所有正确的样式 - 即使你给它一个目标的不透明度,jquery的褪色实现是否没有做正确的事情?
可以您通过将声明的CSS设置为完全不透明但可见:false来解决问题,然后使用淡入淡出到达目标不透明度?
I have a problem with IE.I have a layer that has this style to make it transparent and fullscreen.
position:absolute;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
background-color: #000000;
filter:alpha(opacity=50);
-moz-opacity: 0.5;
opacity: 0.5;
z-index: 1;
And i use the JQuery method fadeIn and fadeOut to show and hide it.Well all well in Opera locks great but IE7 Just overides the style and sets it to 100% opacity. it dosent even fade!!
Peter-Paul Koch has a fantastic article on opacity. In general, quirksmode.org is the first place I go to solve browser-compatibility issues; PPK's done a great deal of research. That said, you look like you have all the right styles in place - is jquery's fadein implementation not doing the right thing, even when you give it a target opacity?
Could you solve the problem by setting the declared CSS to fully-opaque but visible:false, and then use fadeto to get to the target opacity?
这篇关于JQuery IE< div>不透明问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!