Properti durasi animasi CSS
Contoh
Tentukan bahwa animasi harus menyelesaikan satu siklus dalam 3 detik:
div {
animation-duration: 3s;
}
Definisi dan Penggunaan
Properti animation-duration
menentukan berapa lama animasi harus menyelesaikan satu siklus.
Nilai bawaan: | 0 |
---|---|
Diwarisi: | tidak |
Animasi: | tidak. Baca tentang animasi |
Versi: kapan: | CSS3 |
Sintaks JavaScript: | objek .style.animationDuration="3s" |
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Angka yang diikuti oleh -webkit-, -moz-, atau -o- menentukan versi pertama yang berfungsi dengan awalan.
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- |
Sintaks CSS
animation-duration: time|initial|inherit;
Nilai properti
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 |
Halaman Terkait
Tutorial CSS: Animasi CSS
Referensi HTML DOM: properti animationDuration