สไตล์แอนิเมชั่น Duration Property
ตัวอย่าง
การเปลี่ยนคุณสมบัติ animationDuration ของ <div> องค์ประกอบ:
document.getElementById("myDIV").style.animationDuration = "3s";
ความหมายและการใช้งาน
คุณสมบัติ animationDuration กำหนดจำนวนวินาทีหรือมิลลิวินาทีที่แอนิเมชั่นใช้เวลาในการทำให้หนึ่งรอบเสร็จสมบูรณ์
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Numbers ตามด้วย Moz ระบุเวอร์ชันแรกที่ใช้งานได้กับคำนำหน้า
Property | |||||
---|---|---|---|---|---|
animationDuration | 43.0 | 79.0 | 16.0 5.0 Moz |
9.0 | 30.0 |
ไวยากรณ์
ส่งคืนคุณสมบัติ animationDuration:
object.style.animationDuration
ตั้งค่าคุณสมบัติ animationDuration:
object.style.animationDuration = "time|initial|inherit"
มูลค่าทรัพย์สิน
Value | Description |
---|---|
time | Specifies the length an animation takes to finish. Default value is 0, meaning there will be no animation |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
รายละเอียดทางเทคนิค
ค่าเริ่มต้น: | 0 |
---|---|
คืนมูลค่า: | สตริงที่แสดงถึงคุณสมบัติระยะเวลาภาพเคลื่อนไหวขององค์ประกอบ |
เวอร์ชัน CSS | CSS3 |
หน้าที่เกี่ยวข้อง
การอ้างอิง CSS: คุณสมบัติระยะเวลาภาพเคลื่อนไหว