2009-05-06 80 views
1

我衰落的一个DIV缓慢,淡出DIV与酷动画

$(ele).fadeIn('slow'); 

如何创建与淡入沿着一个很好的动画显示的jQuery

+0

对你来说,什么是“真正的动画”? – balexandre 2009-05-06 11:58:24

回答

3

你也可以检查出JQuery UI,因为这可以让你过动画的颜色或阅读this article关于插件难忘的用户体验。

0

可以在jQuery的执行多个动画真的很容易:

/*you can hide your item with the css property first*/ 

<style> 
#id_of_what_want_to_animate{display:none;height:1px;} 
</style> 

然后用jQuery透露它

//target the item that triggers the animation 
$('#clickthis').click(function() { 
    //when clicked animate whatever you want, the 5000 is the duration of the animation in 
    //milliseconds inside the curly braces you can animate css properties 
    $('#id_of_what_want_to_animate').animate({opacity: 1,height: '200px'},5000,function() { 
    //run something else when your animation complete. 
    }); 
}); 

你可以参考jQuery的详细的文档: