CSS -animasie-duur eiendom
Voorbeeld
Spesifiseer dat die animasie een siklus in 3 sekondes moet voltooi:
div {
animation-duration: 3s;
}
Definisie en gebruik
Die animation-duration
eiendom definieer hoe lank 'n animasie moet neem om een siklus te voltooi.
Standaard waarde: | 0 |
---|---|
Geërf: | geen |
Animateerbaar: | geen. Lees oor animeerbaar |
Weergawe: | CSS3 |
JavaScript-sintaksis: | voorwerp .style.animationDuration="3s" |
Blaaierondersteuning
Die nommers in die tabel spesifiseer die eerste blaaierweergawe wat die eiendom ten volle ondersteun.
Nommers gevolg deur -webkit-, -moz-, of -o- spesifiseer die eerste weergawe wat met 'n voorvoegsel gewerk het.
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- |
CSS-sintaksis
animation-duration: time|initial|inherit;
Eiendomswaardes
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 |
Verwante bladsye
CSS-tutoriaal: CSS-animasies
HTML DOM verwysing: animationDuration eiendom