在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
效果图:
代码: //wxml <view class="container"> <view class="usermotto" animation="{{ani}}"> <text class="user-motto">{{motto}}</text> </view> <button bindtap='start'>动画</button> </view> //wxss .usermotto { margin-top: 100px; border: solid; } //js Page({ data: { motto: 'Hello World', }, start () { var animation = wx.createAnimation({ duration: 4000, timingFunction: 'ease', delay: 1000 }); animation.opacity(0.2).translate(100, -100).step() this.setData({ ani: animation.export() }) } }) 参考链接: https://cloud.tencent.com/developer/article/1367247
|
请发表评论