view plaincopyviewclass="view_a"imageanimation="{{animation}}"class="a_img"src="?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvVUZPMDAwMDE=http://www.yiyongtong.com/font/5a6L5L2T/fonts ...
[html] view plain copy
<view class="view_a">
<image animation="{{animation}}" class="a_img" src="?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvVUZPMDAwMDE=http://www.yiyongtong.com/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==http://www.yiyongtong.com/dissolve/70/gravity/Center"></image>
</view>
<view class="sure" bindtap="dh">发射</view>
[css] view plain copy
.sure{
width: 10%;
height:80rpx;
margin-top: 0rpx;
margin-left: 45%;
background: #00ddff;
border-radius: 50rpx;
text-align: center;
line-height: 80rpx;
color: #fff;
}
.view_a{
width: 100%;
height: 900rpx;
display: flex;
background-image: url('?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvVUZPMDAwMDE=http://www.yiyongtong.com/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==http://www.yiyongtong.com/dissolve/70/gravity/Center');
}
.a_img{
margin-top: 600rpx;
margin-left:100rpx;
width: 80rpx;
height:80rpx;
}
[javascript] view plain copy
data: {
animation : ''
},
dh: function(){
var that = this;
//实例化
that.animation = wx.createAnimation({
duration: 200,
timingFunction: "ease",
delay: 1000,
transformOrigin: 'center',
success: function (res) {
console.log(res)
}
})
that.animation