jquery IE Fadein和Fadeout Opacity [英] jquery IE Fadein and Fadeout Opacity

查看:138
本文介绍了jquery IE Fadein和Fadeout Opacity的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到这个奇怪的问题在IE与CSS叠加我申请一个灯箱。基本上,我使用 fadein fadeout 为jquery - 问题是一切都很好EXCEPT在 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 Fadein和Fadeout Opacity的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆