[微信小程序]动画,从顶部掉花的效果(完整代码附效果图)

 有问题可以扫码加我微信,有偿解决问题。承接小程序开发。

微信小程序开发交流qq群   173683895  、 526474645 ;

正文:

<pre class="has">
<code class="language-css">image{

<pre class="has">
<code class="language-css"> width: 100rpx;
height: 100rpx;
position: absolute;
top: -100rpx;
}

如果对您有帮助,请关注我,欢迎加入微信小程序开发交流QQ群(173683866),有问题可以加群问我获取问群里的大神!!!

<pre class="has">
<code class="language-html">
<block wx:if="{{donghua}}">

如果对您有帮助,请关注我,欢迎加入微信小程序开发交流QQ群(173683866),有问题可以加群问我获取问群里的大神!!!

<pre class="has">
<code class="language-javascript">var animation = wx.createAnimation({})
var i = 1;
Page({
data: {
donghua: true,left1: Math.floor(Math.random() 305 + 1),left2: Math.floor(Math.random() 305 + 1),left3: Math.floor(Math.random() 305 + 1),left4: Math.floor(Math.random() 305 + 1),left5: Math.floor(Math.random() 305 + 1),left6: Math.floor(Math.random() 305 + 1),},onShow: function () {
this.donghua()
},donghua: function () {
setTimeout(function () {
animation.translateY(604).step({ duration: 4000 })
this.setData({

  })
  i++;
}.bind(this),500)
if (i < 7) {
  setTimeout(function () {
    this.donghua()
  }.bind(this),500)
} else {
  console.log(22)
  setTimeout(function () {
    this.setData({
      donghua: false
    })
  }.bind(this),4500)
}

}
})

 

相关文章

今天小编给大家分享一下excel图案样式如何设置的相关知识点,...
这篇文章主要讲解了“win10设置过的壁纸如何删除”,文中的讲...
这篇“Xmanager怎么显示远程linux程序的图像”文章的知识点大...
今天小编给大家分享一下xmanager怎么连接linux的相关知识点,...
这篇“如何重置Linux云服务器的远程密码”文章的知识点大部分...
本篇内容介绍了“Linux云服务器手动配置DNS的方法是什么”的...