Thuộc tính tên hoạt hình kiểu
Ví dụ
Thay đổi thuộc tính animationName của phần tử <div>:
document.getElementById("myDIV").style.animationName = "myNEWmove";
Hãy tự mình thử »Sự miêu tả
Thuộc tính animationName đặt hoặc trả về tên cho hoạt ảnh @keyframes.
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 có |
---|---|
Giá trị trả về: | Một Chuỗi, biểu thị thuộc tính tên hoạt hình của một phần tử |
Phiên bản CSS | CSS3 |
Hỗ trợ trình duyệt
animationName
là một tính năng CSS3 (1999).
Nó được hỗ trợ đầy đủ trong tất cả các trình duyệt:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | 11 |
Trang liên quan
Tham chiếu CSS: thuộc tính tên hoạt hình