TransitionEvent propertyName 属性

定义和用法

当发生 transitionevent 时,propertyName 属性返回与过渡关联的 CSS 属性的名称。

此属性是只读的。

实例

获取与过渡关联的属性名称:

document.getElementById("myDIV").addEventListener("transitionend", myFunction);

function myFunction(event) {
  this.innerHTML = "Property name is: " + event.propertyName;
}

亲自试一试

语法

event.propertyName

技术细节

返回值: 字符串值,表示过渡的名称。

浏览器支持

表中的数字注明了完全支持该属性的首个浏览器版本。

属性 Chrome IE Firefox Safari Opera
propertyName 支持 10.0 支持 支持 支持

相关页面

HTML DOM 参考手册:transitionend 事件

HTML DOM 参考手册:TransitionEvent elapsedTime 属性

CSS 参考手册:CSS3 transition 属性

CSS 参考手册:CSS3 transition-property 属性


http://www.vxiaotou.com