CSS animasie-vertraging eiendom
Voorbeeld
Begin die animasie na 2 sekondes:
div {
animation-delay: 2s;
}
Meer "Probeer dit self" voorbeelde hieronder.
Definisie en gebruik
Die animation-delay
eiendom spesifiseer 'n vertraging vir die begin van 'n animasie.
Die animasievertragingswaarde word in sekondes (s) of millisekondes (ms) gedefinieer.
Standaard waarde: | 0s |
---|---|
Geërf: | geen |
Animateerbaar: | geen. Lees oor animeerbaar |
Weergawe: | CSS3 |
JavaScript-sintaksis: | voorwerp .style.animationDelay="1s" |
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-delay | 43.0 4.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-delay: time|initial|inherit;
Eiendomswaardes
Value | Description | Play it |
---|---|---|
time | Optional. Defines the number of seconds (s) or milliseconds (ms) to wait before the animation will start. Default value is 0. Negative values are allowed. If you use negative values, the animation will start as if it had already been playing for N seconds/milliseconds. | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Meer voorbeelde
Voorbeeld
Gebruik negatiewe waardes. Hier sal die animasie begin asof dit reeds vir 2 sekondes gespeel het:
div {
animation-delay: -2s;
}
Verwante bladsye
CSS-tutoriaal: CSS-animasies
HTML DOM verwysing: animationDelay eiendom