0
我配置了following animation淡入淡出,並在「鼠標懸停」中將其滑動到視圖上,僅用於淡出並在「鼠標懸停」上再次滑動。但是,如果我再次將鼠標移回容器DIV上,同一個動畫將繼續,但從錯誤的位置開始。我如何讓它重新回到起始位置?如果可能的話,我想避免添加另一個動畫以將其移回原始位置。在動畫後重置
$(".box").css("opacity",0);
$(".container").mouseover(function() {
$(".box").stop(true, true).animate({top:99, opacity: 1},150);
});
$(".container").mouseout(function() {
$(".box").stop(true, true).animate({top:59, opacity: 0},150);
});
你改變CSS屬性,你需要改變他們回到原來的狀態,就像在[這個FIDDLE](http://jsfiddle.net/9TvRU/6/)... – adeneo