0
我想,當用戶點擊像這樣的鏈接切換的動畫:切換動畫
CSS
.men{
background: url("../img/men4.jpg") no-repeat scroll 16% 0 transparent;
height: 600px;
left: 0;
position: absolute;
width: 50%;
}
.women{
background: url("../img/women1.jpg") no-repeat scroll 84% 0 transparent;
height: 600px;
position: absolute;
right: 0;
width: 50%;
}
HTML
<div class="men">
</div>
<div class="women">
</div>
<a href="#" class="openmen">Men</a>
<a href="#" class="openwomen">Women</a>
JQUERY
$("a.openwomen").click(function(event){
event.preventDefault();
$('.women').animate({width:"80%"});
$('.men').animate({width:"20%"});
$('.men').animate({opacity: 0.5}, 500);
$('.women').animate({opacity: 1}, 500);
});
但我不太確定如何去回合它,我希望它再次回到它原來的狀態。
當我添加切換的鏈接似乎消失出於某種原因。 – user1937021 2013-02-22 08:34:50
嘗試在每個div內添加內容,也許該塊未被繪製; – 2013-02-22 08:42:47