แอนิเมชั่นสไตล์ PlayState Property
ตัวอย่าง
การหยุดภาพเคลื่อนไหวชั่วคราว:
document.getElementById("myDIV").style.animationPlayState = "paused";
ความหมายและการใช้งาน
คุณสมบัติ animationPlayState ระบุว่าแอนิเมชั่นกำลังทำงานหรือหยุดชั่วคราว
หมายเหตุ:ใช้คุณสมบัตินี้เพื่อหยุดภาพเคลื่อนไหวชั่วคราวในระหว่างรอบ
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Numbers ตามด้วย Webkit, Moz หรือ O ระบุเวอร์ชันแรกที่ใช้งานได้กับคำนำหน้า
Property | |||||
---|---|---|---|---|---|
animationPlayState | 43.0 4.0 Webkit |
10.0 | 16.0 5.0 Moz |
9.0 4.0 Webkit |
30.0 15.0 Webkit 12.1 12.0 O |
ไวยากรณ์
ส่งคืนคุณสมบัติ animationPlayState:
object.style.animationPlayState
ตั้งค่าคุณสมบัติ animationPlayState:
object.style.animationPlayState = "running|paused|initial|inherit"
มูลค่าทรัพย์สิน
Value | Description |
---|---|
running | Default value. Specifies that the animation is running |
paused | Specifies that the animation is paused |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
รายละเอียดทางเทคนิค
ค่าเริ่มต้น: | วิ่ง |
---|---|
คืนมูลค่า: | A String แทนคุณสมบัติ animation-play-state ของ element |
เวอร์ชัน CSS | CSS3 |
หน้าที่เกี่ยวข้อง
การอ้างอิง CSS: คุณสมบัติแอนิเมชั่นเล่นสถานะ