zoukankan      html  css  js  c++  java
  • 微信 小程序布局 水平菜单

    <!-- 菜单列表部分 -->
    <view class="wear-menu">
    <view class='menu-box' wx:key="menu" wx:for="{{menuList}}" wx:for-index="index">
    <view class="menu-img" bindtap="selectMenu" data-index="{{index}}" data-id="{{item.id}}">
    <image src='{{item.img}}'></image>
    </view>
    <view class='menu-title'>
    <text>{{item.title}}</text>
    </view>
    </view>
    </view>
     
     
    //-----------------------------------------------------
     
    /* 菜单列表部分 ***********/
    .wear-menu{
    display: flex;
    }
    .menu-box{
    33.33%;
    }
    .menu-img{
    150rpx;
    height: 150rpx;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    }
    .menu-img image{
    100%;
    height: 100%;
    }
    .menu-title{
    text-align: center;
    }
     
    //---------------------------------------------------------------
    // 菜单列表部分
    menuList:[
    { id: 1, img:"../../imgs/index/wear_1.png",title:"今日专场"},
    { id: 1, img: "../../imgs/index/wear_1.png", title: "补货专区" },
    { id: 1,img: "../../imgs/index/wear_1.png", title: "特供专区" }
    ],
  • 相关阅读:
    田忌赛马 题解
    亚历山大的丢番图方程 题解
    zhx's contest题解
    芝麻OI比赛T7edges题解
    CSP-J2020游记
    Linux shell 学习笔记(五)
    Linux shell 学习笔记(四)
    Linux shell 学习笔记(三)
    Linux shell 学习笔记(二)
    Oracle并发
  • 原文地址:https://www.cnblogs.com/dianzan/p/7520194.html
Copyright © 2011-2022 走看看