我想模擬兩個運動員互相競爭。我有他們的三個拆分時間和兩個轉換時間。動畫不同時間的兩個div
所以,比賽將是:裂口1,過渡1,拆2,過渡2,拆分3
我試圖做到這一點的方式模擬它:
$(window).load(function(){
jQuery("#box1").animate({ width: "100%" }, {duration: 100}).animate({ width: "100%" }, 10>).animate({ width: "100%" }, 1000%>).animate({ width: "100%" }, 100%>).animate({ width: "100%" }, 50);
jQuery("#box2").animate({ width: "100%" }, {duration: 50}).animate({ width: "100%" }, 10).animate({ width: "100%" }, 2000).animate({ width: "100%" }, 100).animate({ width: "100%" }, 500);
});
如果ATHLET 1(BOX1)分裂的速度比分裂的速度快。但在上面的例子中,Athlet 2應該在第一個分割中更快,而第二個分割中要慢。但是這不起作用。
HTML代碼:
<div id="box1">Athlet 1</div>
<div id="box2">Athlet 2</div>
你能幫幫我嗎?
在德國的一個例子可以在這裏找到:http://www.trinews.at/trimag/index.asp?f=head2head&VID=703&athlet1=117252&athlet2=117256
感謝
plz在這裏添加你的html爲 – LLAlive 2012-08-17 11:14:50
爲什麼所有的寬度都是100%? – Archer 2012-08-17 11:28:34
在我的帖子上面添加了html。 – 2012-08-17 11:31:41