สไตล์แอนิเมชั่นIterationCountคุณสมบัติ
ตัวอย่าง
การเปลี่ยนคุณสมบัติ animationIterationCount ของ <div> องค์ประกอบ:
document.getElementById("myDIV").style.animationIterationCount = "infinite";
ความหมายและการใช้งาน
คุณสมบัติ animationIterationCount ตั้งค่าหรือส่งคืนจำนวนครั้งที่ควรเล่นแอนิเมชั่น
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Numbers ตามด้วย Moz ระบุเวอร์ชันแรกที่ใช้งานได้กับคำนำหน้า
Property | |||||
---|---|---|---|---|---|
animationIterationCount | 43.0 | 79.0 | 16.0 5.0 Moz |
Not supported | 30.0 |
ไวยากรณ์
ส่งคืนคุณสมบัติ animationIterationCount:
object.style.animationIterationCount
ตั้งค่าคุณสมบัติ animationIterationCount:
object.style.animationIterationCount = "number|infinite|initial|inherit"
มูลค่าทรัพย์สิน
Value | Description |
---|---|
number | A number that defines how many times an animation should be played. Default value is 1 |
infinite | Specifies that the animation should be played infinite times (for ever) |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
รายละเอียดทางเทคนิค
ค่าเริ่มต้น: | 1 |
---|---|
คืนมูลค่า: | สตริงที่แสดงถึงคุณสมบัติการวนซ้ำของแอนิเมชั่นขององค์ประกอบ |
เวอร์ชัน CSS | CSS3 |
หน้าที่เกี่ยวข้อง
การอ้างอิง CSS: คุณสมบัติการวนซ้ำแอนิเมชั่นการนับ