jQuery: Animating opacity in IE

痴心易碎 提交于 2019-11-29 08:04:16

Try to set the opacity to zero before you animate it:

$("div#bgcover").css({ opacity: 0.0 }).animate( {opacity:.70}, 2500);

Opacity does not work in IE (older versions). You will need to animate the filter property:

IE

var val = .7;
{filter: 'alpha(opacity = '+(val * 100)+')'}

In ie I believe the command should be alpha:.70

You may need to write an exception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!