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