2013-04-24 60 views

回答

0

Working Example

您可以設置bottom0,然後div的從底部動畫,同比增長。另外,請注意我已經創建了兩個事件 - 一個用於頂部d​​iv,另一個用於底部集合。

$(".riga .hoverific").hover(function() { 
    $(this).stop().animate({ 
    width: "70%", 
    height: "70%", 
    backgroundColor: "lightBlue" 
    }).css({'z-index':'3'}); 
}, function() { 
    $(this).stop().animate({ 
    width: "50%", 
    height: "50%", 
    backgroundColor: "silver" 
    }).css({'z-index':'1'}); 
}); 


$(".riga2 .hoverific").hover(function() { 
    $(this).stop().animate({ 
    width: "70%", 
    height: "70%", 
    bottom: "0%", 
    backgroundColor: "lightBlue" 
    }).css({'z-index':'3'}); 
}, function() { 
    $(this).stop().animate({ 
    width: "50%", 
    height: "50%", 
    backgroundColor: "silver" 
    }).css({'z-index':'1'}); 
}); 
+0

謝謝,很好!我在css中添加了底部:0,這樣我有一個事件。 – user2316417 2013-04-25 12:07:56

+0

@ user2316417卓越的思維 – 2013-04-25 12:32:37