[英]Any way to detect the procedure status of a CSS3 transition/transform/animation?
假设,如果为DOM元素分配了CSS3过渡/转换/动画,那么我是否可以检测该过程的状态?
我想这样做的原因是因为我正在寻找过渡链之类的东西,例如,在上一个过渡之后运行一个过渡。
我在http://cssglue.com/cubic中做了类似的操作,它是一个过渡,在过渡结束时添加或删除了一个类。
这是链接过渡的方式:
element.addEventListener(webkitTransitionEnd, function(ev){
if(ev.propertyName == "min-width") { //listen to property you're changing
element.className += " classWithNewTransition";
}
}, false);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.