例
獲取與動畫相關的動畫名稱:
var x = document.getElementById("myDIV");
x.addEventListener("animationstart",
myStartFunction);
function myStartFunction(event) {
this.innerHTML
= "Animation-name is: " + event.animationName;
} 試一試» 定義和用法
該animationName屬性返回動畫的名字,當動畫事件發生。
動畫的名字是價值動畫名 CSS屬性。
此屬性為只讀。
瀏覽器支持
在表中的數字規定,完全支持該財產瀏覽器版本。
| 屬性 | |||||
|---|---|---|---|---|---|
| animationName | 是 | 10.0 | 6 | 是 | 是 |
句法
event .animationName技術細節
| 返回值: | 一個String,代表動畫的名字 |
|---|
相關頁面
HTML DOM參考: 該animationstart事件
HTML DOM參考: 該animationiteration事件
HTML DOM參考: 該animationend事件
HTML DOM參考: AnimationEvent elapsedTime Property
CSS參考: CSS3 animation Property
CSS參考: CSS3 animation-name Property
<事件對象