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

.startTime()

优质
小牛编辑
118浏览
2023-12-01
.startTime( value:Number ) : * 获取/设定动画在其父时间轴上的开始时间。
var start = myAnimation.startTime(); //gets current start time
myAnimation.startTime(2); //sets the start time
.startTime()适用于TweenMaxTweenLite

.startTime()的参数

.startTime() 示例


2秒开始动画

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;
  }
var myTween=new TweenMax('.box', 5, {
    x: 500,
});
myTween.startTime(2);

.startTime()返回值

.startTime()的补充说明