- TimelineMax 中文手册 / TimelineLite 中文手册
- TimelineMax()
- .add()
- .addCallback()
- .addLabel()
- .addPause()
- .remove()
- .removeCallBack()
- .removeLabel()
- .removePause()
- .to()
- .from()
- .fromTo()
- .staggerTo()
- .staggerFrom()
- .staggerFromTo()
- .set()
- delay
- paused
- useFrames
- tweens
- stagger
- align
- autoRemoveChildren
- smoothChildTiming
- repeat
- repeatDelay
- yoyo
- callbackScope
- onStart
- onStartParams
- onStartScope
- onComplete
- onCompleteParams
- onCompleteScope
- onReverseComplete
- onReverseCompleteParams
- onReverseCompleteScope
- onUpdate
- onUpdateParams
- onUpdateScope
- onRepeat
- onRepeatParams
- onRepeatScope
- .play()
- .pause()
- .paused()
- .restart()
- .resume()
- .reverse()
- .reversed()
- .seek()
- .timeScale()
- .tweenTo()
- .tweenFromTo()
- .delay()
- .repeat()
- .repeatDelay()
- .duration()
- .totalDuration()
- .progress()
- .totalProgress()
- .time()
- .totalTime()
- .endTime()
- .startTime()
- .yoyo()
- .autoRemoveChildren
- .data
- .smoothChildTiming
- .timeline
- .call()
- .clear()
- .currentLabel()
- .eventCallback()
- TimelineMax.exportRoot()
- .getActive()
- .getChildren()
- .getLabelAfter()
- .getLabelBefore()
- .getLabelsArray()
- .getLabelTime()
- .getTweensOf()
- .invalidate()
- .isActive()
- .kill()
- .recent()
- .shiftChildren()
文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
.isActive()
.isActive( ) : Boolean
指示动画当前是否处于活动状态(意味着播放头在此实例的时间范围内正在活动,并且未暂停,也不是其任何祖先时间轴)。
.isActive()适用于TimelineMaxTimelineLite
.isActive()的参数
.isActive() 示例
只有在静止状态下才能反转动画方向
body, html {
font-family: Signika Negative, sans-serif;
background: #111;
color:#efefef;
}
.wrapper {
width:400px;
height:100px;
background:#444;
margin-bottom:10px;
}
.box {
width:100px;
height:100px;
background:#88ce02;
}
button {
margin:10px 0;
padding:10px;
}
var endX = 300;
var tm = new TimelineMax();
tm.to('.box', 2, {x:endX, ease:Linear.easeNone}).reverse();
tweenBox=document.getElementById("tweenBox")
tweenBox.onclick=function(){
if(!tm.isActive()){
//只有在tween is not active状态下才能反转动画方向
tm.reversed(!tm.reversed())
}
}
.isActive()返回值
.isActive()的补充说明
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论