动画的透明度不IE浏览器上正常工作 [英] Animate opacity doesn't work properly on IE

查看:269
本文介绍了动画的透明度不IE浏览器上正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用动画()来改变的 DIV 的高度和透明度。在div在CSS图像背景。它工作正常在Firefox和Safari浏览器,但是当我在IE中测试它已经被删除的背景。这是我的code:

I'm trying to use animate() to change the height and opacity of a div. The div has an image background in CSS. It works fine on Firefox and Safari, but when I test it in IE the background is being removed. This is my code:

if (jQuery.support.opacity) {
    jQuery('#list_box').animate({opacity: '1',height: '300px',top: newTop},{duration: 300});
} else {
    jQuery('#list_box').animate({filter: 'alpha(opacity=100)',height: '300px',top: newTop},{duration: 300});
}

我怎样才能解决这个问题呢?

How can I fix this problem?

推荐答案

我是IM pression是jQuery的做了整体透明度支持的事情你下。
这是否工作所有的浏览器?

I was under the impression that jQuery did the whole opacity support thing for you. Does this work for all browsers?

$('#list_box').animate({opacity: '1',height: '300px',top: newTop},{duration: 300});

这篇关于动画的透明度不IE浏览器上正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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