Phong cách hoạt hình
Thí dụ
Thay đổi thuộc tính animationName của phần tử <div>:
document.getElementById("myDIV").style.animationName = "myNEWmove";
Định nghĩa và Cách sử dụng
Thuộc tính animationName đặt hoặc trả về tên cho hoạt ảnh @keyframes.
Hỗ trợ trình duyệt
Các số trong bảng chỉ định phiên bản trình duyệt đầu tiên hỗ trợ đầy đủ thuộc tính.
Các số theo sau là Webkit, Moz hoặc O chỉ định phiên bản đầu tiên hoạt động với tiền tố.
Property | |||||
---|---|---|---|---|---|
animationName | 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 |
Cú pháp
Trả về thuộc tính animationName:
object.style.animationName
Đặt thuộc tính animationName:
object.style.animationName = "none|keyframename|initial|inherit"
Giá trị tài sản
Value | Description |
---|---|
none | Default value. Specifies that there will be no animation (can be used to override animations coming from the cascade) |
keyframename | Specifies the name of the keyframe you want to bind to the selector |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Chi tiết kỹ thuật
Giá trị mặc định: | không ai |
---|---|
Giá trị trả lại: | Một chuỗi, đại diện cho thuộc tính tên hoạt ảnh của một phần tử |
Phiên bản CSS | CSS3 |
Các trang liên quan
Tham chiếu CSS: thuộc tính animation-name