2009-05-06 83 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的詳細的文檔: