当前位置: 首页 > 文档资料 > TweenMax 中文文档 >

yoyoEase

优质
小牛编辑
122浏览
2023-12-01
yoyoEase: Ease | Boolean 定义动画返回时,缓动效果如何,默认false,返回时的缓动效果按照前进时的反转。
例如,动画前行效果ease:Power1.easeOut,回转时则变成是ease:Power1.easeIn。如果设置为true,回转时则与前进相同,为ease:Power1.easeOut。
也可以设置为特定的ease效果,例如Power2.easeOut。 yoyoEase适用于TweenMax

yoyoEase的参数

yoyoEase 示例

默认:false

true

body {
    background: #f8f8f8;
    font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #000;
    margin: 0 10px;
    padding: 0;
}
.box {
    width:50px;
    height:50px;
    border-radius:6px;
    margin-top:4px;
    display:inline-block
  }
.green{
    background-color:#6fb936;
  }
.orange {
    background-color: #f38630;
}
new TweenMax('.green', 3, {
    x: 500,
    repeat: -1,
    ease: Bounce.easeOut,
    yoyo: true,
});
new TweenMax('.orange', 3, {
    x: 500,
    repeat: -1,
    ease: Bounce.easeOut,
    yoyo: true,
    yoyoEase: true,
});

yoyoEase返回值

yoyoEase的补充说明