十年網(wǎng)站開發(fā)經(jīng)驗 + 多家企業(yè)客戶 + 靠譜的建站團隊
量身定制 + 運營維護+專業(yè)推廣+無憂售后,網(wǎng)站問題一站解決
怎么在微信小程序中實現(xiàn)左滑動顯示菜單功能?針對這個問題,這篇文章詳細介紹了相對應(yīng)的分析和解答,希望可以幫助更多想解決這個問題的小伙伴找到更簡單易行的方法。
在吉木薩爾等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強發(fā)展的系統(tǒng)性、市場前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供成都做網(wǎng)站、成都網(wǎng)站建設(shè)、成都外貿(mào)網(wǎng)站建設(shè) 網(wǎng)站設(shè)計制作按需網(wǎng)站開發(fā),公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),成都品牌網(wǎng)站建設(shè),全網(wǎng)整合營銷推廣,外貿(mào)網(wǎng)站制作,吉木薩爾網(wǎng)站建設(shè)費用合理。
view
嗨!你好,{{user.name}} {{item.name}} 現(xiàn)場記錄 更多...
css
view-left{ width:40%; float:left; height:150px; background-color:#33AEFD; } left-text{ text-align: center; color: #fff; } userinfo{ height:50px; } userImg{ border:1px solid #fff; height:40px; width:40px; margin:5px; border-radius: 100px; float: left; } userImg image{ height:40px; width:40px; border-radius: 100px; } userText{ color: #fff; line-height: 50px; } img-view{ height:120px; width:80%; margin:0 auto; border:1px solid #33AEFD; } imgs{ border:2px solid #fff; width:80px; height:80px; margin:20px auto; display: block; border-radius: 100px; } more-view{ width:40%; float:left; height:150px; margin-left:7%; background-color:#D1D1D1; } more{ margin:45% auto; text-align:center; color: #fff; } bottom{ bottom: 0px; position: absolute; margin: 0 auto; width:100%; height:50px; } page,.page { height: 100%; font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'Droid Sans Fallback', 'Microsoft Yahei', sans-serif; } /*左側(cè)導(dǎo)航列表 */ page-bottom{ height: 100%; width: 75%; position: fixed; background-color: rgb(0, 68, 97); z-index: 0; } page-list{ color: white; padding: 30rpx 0 30rpx 40rpx; } /*右側(cè)展示層 */ page-top{ position: relative; top: 0; left:0; width: 750rpx; height: 100%; background-color: rgb(255, 255, 255); z-index: 0; transition: All 0.4s ease; -webkit-transition: All 0.4s ease; } page-state{ transform: rotate(0deg) scale(1) translate(75%,0%); -webkit-transform: rotate(0deg) scale(1) translate(75%,0%); } imgw{width:100%;} /*右側(cè)列表按鈕 */ page-top .left-nav{ position: fixed; width: 68rpx; height: 68rpx; left: 20rpx; bottom: 20rpx; } /*右側(cè)遮罩層 */ page-mask{ position: absolute; width: 100%; height: 100%; top: 0; left: 0; background-color: rgba(0,0,0,0.5); z-index: 998; } page-mask-show{ display: none; }
js
var app = getApp(); var data = require('../../utils/data.js'); Page({ /** * 頁面的初始數(shù)據(jù) */ data: { addNumber:0, banner_url: data.bannerList(), nav_list: [{ name: "現(xiàn)場記錄", url:"../expo-list/expo-list" },{ name: "退出", url: "../login/login" }], user:null, open: false, indicatorDots: true,//是否顯示面板指示點 autoplay: true,//是否開啟自動切換 interval: 3000,//自動切換時間間隔 duration: 500//滑動動畫時長 }, gotoUrl:function(e){ wx.navigateTo({ url: e.currentTarget.dataset.id }) }, //列表的操作函數(shù) open_list: function () { //此處進行操作 this.setData({ open: false }); }, //左側(cè)導(dǎo)航的開關(guān)函數(shù) offCanvas: function () { if (this.data.open) { this.setData({ open: false }); } else { this.setData({ open: true }); } }, })
關(guān)于怎么在微信小程序中實現(xiàn)左滑動顯示菜單功能問題的解答就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,如果你還有很多疑惑沒有解開,可以關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道了解更多相關(guān)知識。