jQuery绑定到CSS3过渡发生 [英] jQuery bind to css3 transition occuring

查看:105
本文介绍了jQuery绑定到CSS3过渡发生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,在我的研究中,我发现的唯一的css3过渡事件是transitionEnd.我想做的是将javascript函数绑定到元素,以便在发生过渡时不断重新触发.考虑一下$(window).resize,但是要考虑使用css3过渡来调整元素的大小.

So far in my research the only css3 transition event I've found is transitionEnd. What I would like to do is bind a javascript function to an element to be constantly re-fired while a transition is occurring. Think $(window).resize but for an element being resized with a css3 transition.

这可能吗?我没有找到transitionStart,transitionAnimation或其他任何可以让我检测到过渡发生的开始或时间的东西.

Is this possible? I have found no transitionStart, transitionAnimation or anything else that would allow me to detect, the start of, or the time when, a transition is occurring.

我更喜欢jQuery的绑定,但是其他方法也可以.这也需要在FF,Chrome,Safari和Opera中运行.谢谢大家!

I would prefer jQuery's bindings, but other methods are fine. Also this needs to work in FF, Chrome, Safari and Opera. Thanks folks!

推荐答案

与CSS3转换相关的唯一事件是transitionend [1].

The only event associated with CSS3 transitions is the transitionend[1].

[1] http://www.w3.org/TR/css3-transitions/#transition-events-

这篇关于jQuery绑定到CSS3过渡发生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆