它似乎确实在为 3 个属性设置动画margin-top
:font-size
和margin-bottom
:
var propertyName = e.propertyName || e.originalEvent.propertyName;
console.log(propertyName);
见http://codepen.io/anon/pen/Fwfty
编辑
获取所有属性有点棘手。我在http://jsfiddle.net/ZD2fY/1/上做了一个例子:
$.fn.onWebkitTransitionEnd = function(callback) {
var $this = this;
var properties = [];
var events = [];
var onFinished = function() {
if (callback) {
callback(properties, events);
}
$this.off('webkitTransitionEnd', onWebkitTransitionEnd);
};
var finishTimeout = null;
var onWebkitTransitionEnd = function(e) {
var propertyName = e.propertyName || e.originalEvent.propertyName;
properties.push(propertyName);
events.push(e);
clearTimeout(finishTimeout);
finishTimeout = setTimeout(onFinished, 0);
};
$this.on('webkitTransitionEnd', onWebkitTransitionEnd);
};
然后你会这样称呼它:
$("div p").eq(0).addClass("fadein").onWebkitTransitionEnd(function(properties, events) {
console.log(properties, events);
});