带有className的TweenMax cubic bezier不起作用

时间:2017-04-27 14:34:20

标签: tweenmax tweenlite timelinemax

                    var tween = TweenMax.to("#animate123", 5, {
                        bezier:{
                            type:"cubic", 
                            values:
                            [{"x":178.853394,"y":292.738353},{"x":178.853394,"y":292.738353},{"x":461.554575,"y":189.214815},{"x":640,"y":255.010604}], 
                            autoRotate:["x","y","rotation", 0, true]
                        }, ease:Power1.easeInOut},{className: "+=fish"});

带有className的TweenMax Beizerplugin无效

立方beizer上的

会减少animate123 div的大小

1 个答案:

答案 0 :(得分:0)

我们可以通过2个补间

来做到这一点
TweenMax.to("#animate123", 5, {
      bezier:{
        type:"cubic",
        values:[{"x":344.81782,"y":364.169429},{"x":344.81782,"y":364.169429},{"x":547.777749,"y":238.886108},{"x":639.545559,"y":254.717818}],
        autoRotate:["x","y","rotation", 0, true]
      }, 
      ease:Power1.easeInOut
    });
    TweenMax.to("#animate123", 1, {className: "+=finish"});