.shiftChildren( amount:Number, adjustLabels:Boolean, ignoreBeforeTime:Number ) : *
startTime
)移动一定秒数或帧。当你想在某个点插入动画,将已存在的动画后移以腾出位置给新动画时,可以考虑使用此方法。参数 | 类型 | 必填 | 说明 |
---|---|---|---|
amount | Number | 是 | 所有子项调整的秒数(或帧) |
adjustLabels | Boolean | 否 | (default = false)是否同时调整label标记 |
ignoreBeforeTime | Number | 否 | 仅调整此时间点及其后的子项(default = 0) |
所有动画往后调整3秒
.box {
width:50px;
height:50px;
position:relative;
border-radius:6px;
margin-top:4px;
}
.green{
background-color:#6fb936;
}
.orange {
background-color:#f38630;
}
.grey {
background-color:#989898;
}
var tl = new TimelineLite();
tl.to('.green', 1, {x:200})
.to('.grey', 1, {x:300}, '+=1')
.to('.orange', 1, {x:400}, '+=1')
.shiftChildren(3);
转载原创文章请注明:文章转载自:TweenMax中文网 [https://www.tweenmax.com.cn]
本文地址:https://www.tweenmax.com.cn/api/timelinemax/shiftChildren()