jquery IE 淡入淡出不透明度 [英] jquery IE Fadein and Fadeout Opacity
问题描述
我在 IE 中遇到了一个带有 CSS Overlay 的奇怪问题,我正在申请一个灯箱.基本上,我将 fadein
和 fadeout
用于 jquery - 问题是除了 IE
之外,一切正常.
I am getting this weird problem in IE with a CSS Overlay I am applying for a lightbox. Basically, I use fadein
and fadeout
for jquery - the problem is that everything works fine EXCEPT in IE
.
在 IE 中 - 我没有淡入淡出 - 而是直接进入不透明背景.
In IE - I get no fadein - rather it just goes straight to opacity background.
在淡出时 - 它会移除 < 的不透明度".1 秒,并在移除覆盖层之前将页面呈现为纯色".
On fadeout - it removes the "opacity" for < 1 sec second and renders the page a "solid color" before removing the overlay.
有人知道如何修复这个错误吗?它真的很烦人 - 我使用了所有正确的过滤器等,它只是 IE 中的淡入淡出?
Anyone know how to fix this bug ? Its really annoying - I am using all the correct filters etc its just the fadein and fadeout in IE ?
推荐答案
我在 IE8 中遇到了同样的问题.在调用fadeIn()之前在JavaScript中设置DIV的不透明度解决了问题:
I had the same problem in IE8. Setting the opacity of the DIV in JavaScript before I called fadeIn() solved the problem:
$('.overlay').css('filter', 'alpha(opacity=40)');
$('.overlay').fadeIn(500);
这只是使用一个普通的 DIV 而不是透明的 PNG.
This was using just a plain DIV not a transparent PNG.
这篇关于jquery IE 淡入淡出不透明度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!