本文介绍了jQuery应用css opacity的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的代码是什么?我的代码是什么?我的代码是什么?已经:
$('#mydiv')。animate({'opacity':'0.5'});
和
$('#mydiv')。css('opacity',0.5);
透明度应用于此div中保存的图片,但不包含任何文本,
解决方案
尝试使用:
-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity = 75); / * IE 8 * /
filter:alpha ); / *较旧的IEs * /
希望对您有帮助
I have tried to get the opacity to work in IE, I am testing in IE8 at the moment, Chrome etc works fine but IE8 is terrible.
My code has been:
$('#mydiv').animate({'opacity': '0.5'});
and
$('#mydiv').css('opacity', 0.5);
The opacity is applied to the images held within this div but none of the text, it's very infuriating :( can anyone help me? Thanks in advance.
解决方案
try with this:
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=75)"; /* IE 8 */
filter: alpha(opacity=75); /* older IEs */
hope this is helpful for you
这篇关于jQuery应用css opacity的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!