最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

微信小程序?qū)崿F(xiàn)彈出菜單動(dòng)畫

 更新時(shí)間:2019年06月21日 11:35:04   作者:CodeHunter_qcy  
這篇文章主要為大家詳細(xì)介紹了微信小程序?qū)崿F(xiàn)彈出菜單動(dòng)畫,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

微信小程序動(dòng)畫之彈出菜單,供大家參考,具體內(nèi)容如下

效果圖

js:

Page({
 data: {
  isPopping: false,
  animPlus: {},
  animCollect: {},
  animTranspond: {},
  animInput: {},
  animCloud:{},
  aninWrite:{},
 },
 //點(diǎn)擊彈出
 plus: function () {
  if (this.data.isPopping) {
   //縮回動(dòng)畫
   this.popp();
   this.setData({
    isPopping: false
   })
  } else if (!this.data.isPopping) {
   //彈出動(dòng)畫
   this.takeback();
   this.setData({
    isPopping: true
   })
  }
 },
 input: function () {
  console.log("input")
 },
 transpond: function () {
  console.log("transpond")
 },
 collect: function () {
  console.log("collect")
 },
 cloud:function(){
  console.log("cloud")
 },
 write: function () {
  console.log("cloud")
 },


 //彈出動(dòng)畫
 popp: function () {
  //plus順時(shí)針旋轉(zhuǎn)
  var animationPlus = wx.createAnimation({
   duration: 400,
   timingFunction: 'ease-out'
  })
  var animationcollect = wx.createAnimation({
   duration: 400,
   timingFunction: 'ease-out'
  })
  var animationTranspond = wx.createAnimation({
   duration: 400,
   timingFunction: 'ease-out'
  })
  var animationInput = wx.createAnimation({
   duration: 400,
   timingFunction: 'ease-out'
  })
  var animationCloud = wx.createAnimation({
   duration: 400,
   timingFunction: 'ease-out'
  })
  var animationWrite = wx.createAnimation({
   duration: 400,
   timingFunction: 'ease-out'
  })
  animationPlus.rotateZ(180).step();
  animationcollect.translate(-90, -100).rotateZ(180).opacity(1).step();
  animationTranspond.translate(-140, 0).rotateZ(180).opacity(1).step();
  animationInput.translate(-90, 100).rotateZ(180).opacity(1).step();
  animationCloud.translate(0, 135).rotateZ(180).opacity(1).step();
  animationWrite.translate(0, -135).rotateZ(180).opacity(1).step();
  this.setData({
   animPlus: animationPlus.export(),
   animCollect: animationcollect.export(),
   animTranspond: animationTranspond.export(),
   animInput: animationInput.export(),
   animCloud: animationCloud.export(),
   animWrite: animationWrite.export(),
  })
 },
 //收回動(dòng)畫
 takeback: function () {
  //plus逆時(shí)針旋轉(zhuǎn)
  var animationPlus = wx.createAnimation({
   duration: 400,
   timingFunction: 'ease-out'
  })
  var animationcollect = wx.createAnimation({
   duration: 400,
   timingFunction: 'ease-out'
  })
  var animationTranspond = wx.createAnimation({
   duration: 400,
   timingFunction: 'ease-out'
  })
  var animationInput = wx.createAnimation({
   duration: 400,
   timingFunction: 'ease-out'
  })
  var animationCloud = wx.createAnimation({
   duration: 400,
   timingFunction: 'ease-out'
  })
  var animationWrite = wx.createAnimation({
   duration: 400,
   timingFunction: 'ease-out'
  })
  animationPlus.rotateZ(0).step();
  animationcollect.translate(0, 0).rotateZ(0).opacity(0).step();
  animationTranspond.translate(0, 0).rotateZ(0).opacity(0).step();
  animationInput.translate(0, 0).rotateZ(0).opacity(0).step();
  animationCloud.translate(0, 0).rotateZ(0).opacity(0).step();
  animationWrite.translate(0, 0).rotateZ(0).opacity(0).step();
  this.setData({
   animPlus: animationPlus.export(),
   animCollect: animationcollect.export(),
   animTranspond: animationTranspond.export(),
   animInput: animationInput.export(),
   animCloud: animationCloud.export(),
   animWrite: animationWrite.export(),
  })
 },


 onLoad: function (options) {
  // 生命周期函數(shù)--監(jiān)聽頁面加載
 },
 onReady: function () {
  // 生命周期函數(shù)--監(jiān)聽頁面初次渲染完成
 },
 onShow: function () {
  // 生命周期函數(shù)--監(jiān)聽頁面顯示
 },
 onHide: function () {
  // 生命周期函數(shù)--監(jiān)聽頁面隱藏
 },
 onUnload: function () {
  // 生命周期函數(shù)--監(jiān)聽頁面卸載
 },
 onPullDownRefresh: function () {
  // 頁面相關(guān)事件處理函數(shù)--監(jiān)聽用戶下拉動(dòng)作
 },
 onReachBottom: function () {
  // 頁面上拉觸底事件的處理函數(shù)
 },
 onShareAppMessage: function () {
  // 用戶點(diǎn)擊右上角分享
  return {
   title: 'title', // 分享標(biāo)題
   desc: 'desc', // 分享描述
   path: 'path' // 分享路徑
  }
 }
})

wxml:

<view>
 <image src="../../image/1.png" class="img-style" animation="{{animWrite}}" bindtap="write"></image>
 <image src="../../image/4.png" class="img-style" animation="{{animCollect}}" bindtap="collect"></image>
 <image src="../../image/2.png" class="img-style" animation="{{animTranspond}}" bindtap="transpond"></image>
 <image src="../../image/3.png" class="img-style" animation="{{animInput}}" bindtap="input"></image>
 <image src="../../image/5.png" class="img-style" animation="{{animCloud}}" bindtap="cloud"></image>
 <image src="../../image/6.png" class="img-switch-style" animation="{{animPlus}}" bindtap="plus"></image>
</view>

wxss:

.img-switch-style {
 height: 120rpx;
 width: 120rpx;
 position: absolute;
 bottom: 250rpx;
 right: 100rpx;
 z-index: 100;
}
 
.img-style {
 height: 120rpx;
 width: 120rpx;
 position: absolute;
 bottom: 250rpx;
 right: 100rpx;
 opacity: 0;
}

以上就是本文的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • JavaScript中使用arguments獲得函數(shù)傳參個(gè)數(shù)實(shí)例

    JavaScript中使用arguments獲得函數(shù)傳參個(gè)數(shù)實(shí)例

    這篇文章主要介紹了JavaScript中使用arguments獲得函數(shù)傳參個(gè)數(shù)實(shí)例,本文用了多個(gè)例子來講解arguments的使用,需要的朋友可以參考下
    2014-08-08
  • JavaScript中的onerror事件概述及使用

    JavaScript中的onerror事件概述及使用

    onerror事件用來協(xié)助處理頁面中的JavaScript錯(cuò)誤主要包括:Window.onerror事件,img載入錯(cuò)誤,接下來為大家詳細(xì)介紹下,感興趣的朋友可以參考下哈
    2013-04-04
  • JavaScript中的Function函數(shù)

    JavaScript中的Function函數(shù)

    函數(shù)是由事件驅(qū)動(dòng)的或者當(dāng)它被調(diào)用時(shí)執(zhí)行的可重復(fù)使用的代碼塊,接下來跟著小編一起來學(xué)習(xí)javascript中的function函數(shù),小伙伴們快來一起學(xué)習(xí)吧
    2015-08-08
  • 淺談JavaScript 的執(zhí)行順序

    淺談JavaScript 的執(zhí)行順序

    JavaScript是一種描述型腳本語言,它不同于java或C#等編譯性語言,它不需要進(jìn)行編譯成中間語言,而是由瀏覽器進(jìn)行動(dòng)態(tài)地解析與執(zhí)行。如果你不能理解javaScript語言的運(yùn)行機(jī)制,或者簡單地說,你不能掌握javascript的執(zhí)行順序,那你就猶如伯樂駕馭不了千里馬
    2015-08-08
  • 淺談js常用內(nèi)置方法和對(duì)象

    淺談js常用內(nèi)置方法和對(duì)象

    下面小編就為大家?guī)硪黄獪\談js常用內(nèi)置方法和對(duì)象。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧
    2016-09-09
  • $$()函數(shù)應(yīng)用實(shí)例

    $$()函數(shù)應(yīng)用實(shí)例

    $$()函數(shù)應(yīng)用實(shí)例...
    2006-10-10
  • uniapp使用uni.chooseLocation()打開地圖選擇位置詳解

    uniapp使用uni.chooseLocation()打開地圖選擇位置詳解

    這篇文章主要給大家介紹了關(guān)于uniapp使用uni.chooseLocation()打開地圖選擇位置的相關(guān)資料,因?yàn)樽罱陧?xiàng)目中遇到一個(gè)要用戶授權(quán)位置且可以用戶自己選擇位置的功能,需要的朋友可以參考下
    2023-06-06
  • 微信小程序?qū)崿F(xiàn)頁面監(jiān)聽自定義組件的觸發(fā)事件

    微信小程序?qū)崿F(xiàn)頁面監(jiān)聽自定義組件的觸發(fā)事件

    這篇文章主要為大家詳細(xì)介紹了微信小程序?qū)崿F(xiàn)頁面監(jiān)聽自定義組件的觸發(fā)事件,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2020-11-11
  • JavaScript字符串處理常見操作方法小結(jié)

    JavaScript字符串處理常見操作方法小結(jié)

    這篇文章主要介紹了JavaScript字符串處理常見操作方法,結(jié)合實(shí)例形式分析了JavaScript字符串操作常見的轉(zhuǎn)換、截取、分割、獲取等相關(guān)實(shí)現(xiàn)技巧,需要的朋友可以參考下
    2019-11-11
  • JavaScript使用ul中l(wèi)i標(biāo)簽實(shí)現(xiàn)刪除效果

    JavaScript使用ul中l(wèi)i標(biāo)簽實(shí)現(xiàn)刪除效果

    這篇文章主要為大家詳細(xì)介紹了JavaScript使用ul中l(wèi)i標(biāo)簽實(shí)現(xiàn)刪除效果,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2019-04-04

最新評(píng)論

曲麻莱县| 柳州市| 交口县| 海丰县| 绥德县| 施秉县| 资阳市| 樟树市| 老河口市| 襄城县| 永城市| 依兰县| 贵南县| 亚东县| 新龙县| 北票市| 永善县| 六安市| 策勒县| 永定县| 南投市| 饶平县| 武强县| 靖安县| 延长县| 巴林左旗| 武隆县| 永泰县| 永兴县| 定边县| 赞皇县| 芦溪县| 得荣县| 伊通| 调兵山市| 井研县| 安宁市| 沙湾县| 巍山| 迁安市| 新疆|