<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
        問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
        當前位置: 首頁 - 科技 - 知識百科 - 正文

        微信小程序實現彈出菜單動畫

        來源:懂視網 責編:小采 時間:2020-11-27 21:54:48
        文檔

        微信小程序實現彈出菜單動畫

        微信小程序實現彈出菜單動畫:微信小程序動畫之彈出菜單,供大家參考,具體內容如下 效果圖 js: Page({ data: { isPopping: false, animPlus: {}, animCollect: {}, animTranspond: {}, animInput: {}, animCloud:{}, aninWrite:{}, },
        推薦度:
        導讀微信小程序實現彈出菜單動畫:微信小程序動畫之彈出菜單,供大家參考,具體內容如下 效果圖 js: Page({ data: { isPopping: false, animPlus: {}, animCollect: {}, animTranspond: {}, animInput: {}, animCloud:{}, aninWrite:{}, },

        微信小程序動畫之彈出菜單,供大家參考,具體內容如下

        效果圖

        js:

        Page({
         data: {
         isPopping: false,
         animPlus: {},
         animCollect: {},
         animTranspond: {},
         animInput: {},
         animCloud:{},
         aninWrite:{},
         },
         //點擊彈出
         plus: function () {
         if (this.data.isPopping) {
         //縮回動畫
         this.popp();
         this.setData({
         isPopping: false
         })
         } else if (!this.data.isPopping) {
         //彈出動畫
         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")
         },
        
        
         //彈出動畫
         popp: function () {
         //plus順時針旋轉
         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(),
         })
         },
         //收回動畫
         takeback: function () {
         //plus逆時針旋轉
         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) {
         // 生命周期函數--監聽頁面加載
         },
         onReady: function () {
         // 生命周期函數--監聽頁面初次渲染完成
         },
         onShow: function () {
         // 生命周期函數--監聽頁面顯示
         },
         onHide: function () {
         // 生命周期函數--監聽頁面隱藏
         },
         onUnload: function () {
         // 生命周期函數--監聽頁面卸載
         },
         onPullDownRefresh: function () {
         // 頁面相關事件處理函數--監聽用戶下拉動作
         },
         onReachBottom: function () {
         // 頁面上拉觸底事件的處理函數
         },
         onShareAppMessage: function () {
         // 用戶點擊右上角分享
         return {
         title: 'title', // 分享標題
         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;
        }
        

        聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        微信小程序實現彈出菜單動畫

        微信小程序實現彈出菜單動畫:微信小程序動畫之彈出菜單,供大家參考,具體內容如下 效果圖 js: Page({ data: { isPopping: false, animPlus: {}, animCollect: {}, animTranspond: {}, animInput: {}, animCloud:{}, aninWrite:{}, },
        推薦度:
        • 熱門焦點

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 亚洲精选在线观看| 免费播放美女一级毛片| 成人影片一区免费观看| 久久久久亚洲AV成人网人人软件| 亚洲成av人片天堂网| 中文字幕不卡免费高清视频| 国产亚洲精品精华液| 久久午夜无码免费| 亚洲精品无码专区2| 一级成人生活片免费看| 四虎影院在线免费播放| 亚洲精品电影在线| 114一级毛片免费| 亚洲国产精品成人AV在线| 全部免费国产潢色一级| 国产成人精品亚洲日本在线 | 国产精品小视频免费无限app| 夜色阁亚洲一区二区三区| 二个人看的www免费视频| 亚洲天堂在线播放| 青娱乐免费在线视频| 亚洲国产aⅴ成人精品无吗| 亚洲精品无码专区久久同性男| 好久久免费视频高清| 亚洲免费在线视频观看| 免费很黄很色裸乳在线观看| 成人毛片100免费观看| 亚洲最新黄色网址| 日本黄页网站免费| 久久青草国产免费观看| 久久精品国产亚洲αv忘忧草| 免费在线观看黄网| 亚洲视频免费播放| 无遮挡国产高潮视频免费观看| 久热综合在线亚洲精品| 在线播放免费人成毛片乱码| 亚洲三级在线播放| 亚洲熟妇av一区二区三区漫画| 97性无码区免费| 久久www免费人成精品香蕉| 亚洲第一男人天堂|