faressoft
faressoft

Reputation: 19651

how to fix opacity on IE6

how to fix opacity on IE6

This code does not work on IE6 !

filter:alpha(opacity=50);
-moz-opacity:0.5;
-khtml-opacity: 0.5;
opacity: 0.5;

And this code !

$('#description').animate({opacity: 0.0}, 1000);

Upvotes: 3

Views: 4781

Answers (2)

Frédéric Hamidi
Frédéric Hamidi

Reputation: 262939

Your styled element needs to have layout for the filter to render properly.

Try:

filter:alpha(opacity=50);
-moz-opacity:0.5;
-khtml-opacity: 0.5;
opacity: 0.5;
display: inline-block;

Or:

filter:alpha(opacity=50);
-moz-opacity:0.5;
-khtml-opacity: 0.5;
opacity: 0.5;
zoom: 1;

Upvotes: 1

Yi Jiang
Yi Jiang

Reputation: 50105

If you're working with opacity in jQuery, then the fadeIn, faceOut and fadeTo function should be better than animate. In your case it would be

$('#description').fadeOut(1000);

Or with fadeTo,

$('#description').fadeOut(1000, 0.0);

But it is work on IE6! :(

http://jsbin.com/owisa/3

Where it is not work?

Upvotes: 0

Related Questions