问题
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);
回答1:
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?
回答2:
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;
来源:https://stackoverflow.com/questions/3749328/how-to-fix-opacity-on-ie6