CSS ภาพเคลื่อนไหว-durationคุณสมบัติ
ตัวอย่าง
ระบุว่าภาพเคลื่อนไหวควรเสร็จสิ้นหนึ่งรอบใน 3 วินาที:
div {
animation-duration: 3s;
}
ความหมายและการใช้งาน
คุณสมบัติanimation-duration
กำหนดระยะเวลาที่ภาพเคลื่อนไหวควรใช้เวลานานเท่าใดจึงจะครบหนึ่งรอบ
ค่าเริ่มต้น: | 0 |
---|---|
รับการถ่ายทอด: | ไม่ |
เคลื่อนไหวได้: | ไม่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS3 |
ไวยากรณ์ JavaScript: | วัตถุ .style.animationDuration="3s" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
ตัวเลขตามด้วย -webkit-, -moz- หรือ -o- ระบุเวอร์ชันแรกที่ทำงานกับคำนำหน้า
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
animation-duration: time|initial|inherit;
มูลค่าทรัพย์สิน
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 |
หน้าที่เกี่ยวข้อง
กวดวิชา CSS: ภาพเคลื่อนไหว CSS
การอ้างอิง HTML DOM: แอนิเมชั่น Duration คุณสมบัติ