- 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()
文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
.paused()
.paused( value:Boolean ) : *
获取或设置动画的暂停状态,该状态指示动画当前是否已暂停。
var paused = myAnimation.paused(); //获取暂停状态
myAnimation.paused( true ); //设置暂停状态(类似pause())
myAnimation.paused( !myAnimation.paused() ); //切换暂停/非暂停状态
返回值:
省略参数会返回当前值(getter),而定义参数会设置值(setter)并返回实例本身以便于链式调用。
例如 myAnimation.paused(true).delay(2).timeScale(0.5);
.paused()适用于TimelineMaxTimelineLite
.paused()的参数
参数名 | 类型 | 必填 | 说明 |
---|---|---|---|
value | Boolean | 否 | 省略参数返回当前值(getter),而定义参数则设置值(setter)并返回实例本身以便于链式调用 |
.paused() 示例
body {
background-color: #f8f8f8;
font-size: 16px;
}
#demo {
width: 692px;
height: 60px;
background-color: #333;
padding: 8px;
margin-bottom: 10px;
}
.box {
width: 50px;
height: 50px;
border-radius: 6px;
margin-top: 4px;
display: inline-block;
position: absolute;
}
.green {
background-color: #6fb936;
}
input[type="button"] {
-webkit-appearance: button;
padding: 8px;
margin-right: 5px;
margin-bottom: 5px;
}
var tm = new TimelineMax();
tm.to('.box', 6, {x: 500});
box = document.getElementById("box"),
playBtn = document.getElementById("playBtn"),
pauseToggleBtn = document.getElementById("pauseToggleBtn"),
playBtn.onclick = function() {
tm.play();
}
pauseToggleBtn.onclick = function() {
tm.paused( !tm.paused())
}
.paused()返回值
.paused()的补充说明
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论