jQuery的CSS能见度动画 [英] jQuery css Visibility with animation

查看:227
本文介绍了jQuery的CSS能见度动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个div的放置彼此下面,我使用CSS的知名度褪色他们进出。为什么我用知名度的原因是使div的不动地方。

I have few div's placed underneath each other and I'm using css visibility to fade them in and out. The reason why I use visibility is so that the div's don't move place.

有关淡入我使用:

$('.drop1').css({opacity: 0.0, visibility: "visible"}).animate({opacity: 1.0});

和淡出我使用:

$('.drop1').css({opacity: 0.0, visibility: "hidden"}).animate({opacity: 1.0})}, 200);

淡入作品,但在淡出不起作用

现在,你可能认为这个问题是最后的' 200 ,但我将需要使用它作为自淡出/能见度延时:隐藏的是MouseLeave事件的200ms后

Now, you may think that the problem is the last ',200' but I will need to use that as a delay since the fadeout/visibility:hidden is on mouseleave event after 200ms.

所以我的问题是:我该怎么做隐藏动画作为一个淡出的知名度。

So my question is: How can I do the visibility hidden with animation to act as a fadeOut.

很多

推荐答案

$('drop1。')的CSS({不透明:1.0,可见性:看得见})。动画({不透明:0},200);

这篇关于jQuery的CSS能见度动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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