0

我无法使用以下示例重复动画(使用jQuery Transit

$("#rotateDiv2").button().click(function() {
    $('#second').transition({
        perspective: '100px',
        easing: 'snap',
        duration: '3000ms',
        rotate3d: '1, 1, 0, 360deg'
    });
});

它确实有效,只有一次有效(当然是在单击按钮时)。第二次我点击它什么都不做。谢谢!!

4

1 回答 1

3

您可以在回调中重置 CSS 转换属性:

http://jsfiddle.net/zA2ZQ/2/

$("#rotateDiv2").button().click(function() {
    $('#second').transition({
        perspective: '100px',
        easing: 'snap',
        duration: '3000ms',
        rotate3d: '1, 1, 0, 360deg'
    }, function(){
      //reset the transform property
      $(this).css('transform', '');
    });
});​
于 2012-07-20T13:17:25.847 回答