请教,createAnimation怎么设置动画高宽变化,能设置百分比吗
发布于 6 年前 作者 fsu 18622 次浏览 来自 问答
onShow() {
 var animation = wx.createAnimation({
   duration: 1500,
   timingFunction: 'ease-out'
 })
 this.animation = animation
 animation.scale(0,0).step()
 this.setData({
   animationDataA: animation.export()
 })
}

这个是设置缩小为零的示例,请问高宽变为100%怎么设置哈

3 回复

参数传入 ‘100%’ 即可

请教是这样吗:animation.width(‘100%’).step()

回到顶部