delay:Number
延迟三秒开始动画
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;
line-height:50px;
text-align:center;
color:#fff;
font-size:18px;
border-radius:6px;
margin-top:4px;
display:inline-block
}
.green{
background-color:#6fb936;
}
new TweenMax('.box', 3, {
x: 500,
delay: 3
});
time={score:3}
TweenMax.to(time, 3, {
score: 0,
ease: Power0.easeNone,
onUpdate:function(){
document.querySelector(".box").innerHTML=Math.ceil(time.score);
}
});
转载原创文章请注明:文章转载自:TweenMax中文网 [https://www.tweenmax.com.cn]
本文地址:https://www.tweenmax.com.cn/api/tweenmax/delay