2011-12-13 23 views
1

我有以下問題。我想重複使用相同的動畫兩次,在同一元素上有不同的延遲。我嘗試以下,但它不工作:爲同一元素調用兩次的CSS3動畫

.myClass{ 
    -webkit-animation: animationName 1s linear 2s, animationName 1s linear 4s; 
} 

奇怪的,什麼我不明白的是,如果我創建第二個動畫,說「animationName2」用相同的內容,如animationName則以下將工作:

.myClass{ 
    -webkit-animation: animationName 1s linear 2s, animationName2 1s linear 4s; 
} 

我錯過了什麼嗎?謝謝

回答

1

根據css-infos.net應該有6個屬性。你有4

它們是:

-webkit-animation: <name> <duration> <timing_function> <delay> <iteration_count> <direction> 

我想有對迭代次數和方向默認值,但CSS是一種biatch一些日子。我認爲你的實際班級被稱爲你認爲在這種情況下叫做myClass?所有通常的調試東西。