我想設計我的CSS文件中這樣說:覆蓋動畫持續時間與CSS類
<h1 class="bounce">Bouncing Text</h1>
<h1 class="bounce fast">Faster Bouncing Text</h1>
我有CSS代碼看起來像這樣,但它似乎並不奏效:
.fast {
-webkit-animation-duration: 1s !important;
animation-duration: 1s !important;
}
.bounce {
-webkit-animation-name: bounce-animation;
animation-name: bounce-animation;
-webkit-animation-duration: 2s;
animation-duration: 2s;
-webkit-animation-timing-function: linear;
animation-timing-function: linear;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
}
「快速」類似乎實際上並沒有改變動畫持續時間。這兩個元素以相同的速度反彈。 無論如何要讓這個設計工作?由於
它怎麼樣不工作?你期望的結果是什麼?發生了什麼呢? – Jon 2015-01-21 00:52:01