สไตล์แอนิเมชั่นDirection Property
ตัวอย่าง
การเปลี่ยนคุณสมบัติ animationDirection ของ <div> องค์ประกอบ:
document.getElementById("myDIV").style.animationDirection = "reverse";
ความหมายและการใช้งาน
คุณสมบัติแอนิเมชั่นDirection ตั้งค่าหรือส่งคืนว่าแอนิเมชั่นควรเล่นแบบย้อนกลับในรอบอื่นหรือไม่
หมายเหตุ:หากตั้งค่าแอนิเมชั่นให้เล่นเพียงครั้งเดียว คุณสมบัตินี้จะไม่มีผลใดๆ
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Numbers ตามด้วย Moz ระบุเวอร์ชันแรกที่ใช้งานได้กับคำนำหน้า
Property | |||||
---|---|---|---|---|---|
animationDirection | 43.0 | 79.0 | 16.0 5.0 Moz |
9.0 | 30.0 |
ไวยากรณ์
ส่งคืนคุณสมบัติ animationDirection:
object.style.animationDirection
ตั้งค่าคุณสมบัติ animationDirection:
object.style.animationDirection = "normal|reverse|alternate|alternate-reverse|initial|inherit"
มูลค่าทรัพย์สิน
Value | Description |
---|---|
normal | Default value. The animation should be played as normal |
reverse | The animation should play in reverse direction |
alternate | The animation will be played as normal every odd time (1,3,5,etc..) and in reverse direction every even time (2,4,6,etc...) |
alternate-reverse | The animation will be played in reverse direction every odd time (1,3,5,etc..) and in a normal direction every even time (2,4,6,etc...) |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
รายละเอียดทางเทคนิค
ค่าเริ่มต้น: | ปกติ |
---|---|
คืนมูลค่า: | สตริงที่แสดงถึงคุณสมบัติทิศทางภาพเคลื่อนไหวขององค์ประกอบ |
เวอร์ชัน CSS | CSS3 |
หน้าที่เกี่ยวข้อง
การอ้างอิง CSS: คุณสมบัติแอนิเมชั่นทิศทาง