Vlastnost CSS animace-trvání
Příklad
Určete, že animace by měla dokončit jeden cyklus za 3 sekundy:
div {
animation-duration: 3s;
}
Definice a použití
Tato animation-duration
vlastnost definuje, jak dlouho by animace měla trvat, než dokončí jeden cyklus.
Výchozí hodnota: | 0 |
---|---|
Zděděno: | Ne |
Animovatelné: | Ne. Přečtěte si o tématu Animable |
Verze: | CSS3 |
Syntaxe JavaScriptu: | objekt .style.animationDuration="3s" |
Podpora prohlížeče
Čísla v tabulce určují první verzi prohlížeče, která plně podporuje vlastnost.
Čísla následovaná -webkit-, -moz- nebo -o- určují první verzi, která pracovala s předponou.
Property | |||||
---|---|---|---|---|---|
animation-duration | 43.0 3.0 -webkit- |
10.0 | 16.0 5.0 -moz- |
9.0 4.0 -webkit- |
30.0 15.0 -webkit- 12.0 -o- |
Syntaxe CSS
animation-duration: time|initial|inherit;
Hodnoty vlastností
Value | Description | Play it |
---|---|---|
time | Specifies the length of time an animation should take to complete one cycle. This can be specified in seconds or milliseconds. Default value is 0, which means that no animation will occur | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Související stránky
CSS tutoriál: CSS animace
Odkaz HTML DOM: vlastnost animationDuration