位置:电子教程 > 小程序Weui在线教程 (如果看不到内容请使用360浏览器) 推荐学习资源
WEUI在微信小程序中的使用
项目框架的制作
栏目首页
weui基础组件
weui表单
weui 操作反馈相关
weui 导航 navbar 切换(类tab)使用教程
weui 搜索searchbar使用教程
当前阅读教程:小程序Weui在线教程 > weui gred九宫格使用教程
阅读(22555525)      收藏       赞(5685)      分享
上一篇: weui flex的布局和样式教程 下一篇: weui icon图标使用教程

image.png

wxml代码如下:


<view class="page">
    <view class="page__hd">
        <view class="page__title">Grid</view>
        <view class="page__desc">九宫格</view>
    </view>
    <view class="page__bd">
        <view class="weui-grids">
            <block wx:for="{{grids}}" wx:key="*this">
                <navigator url="" class="weui-grid" hover-class="weui-grid_active">
                    <image class="weui-grid__icon" src="/images/icon_tabbar.png" />
                    <view class="weui-grid__label">Grid</view>
                </navigator>
            </block>
        </view>
    </view>
    <view class="page__bd">
        <view class="weui-grids">
         
          <navigator url="" class="weui-grid" hover-class="weui-grid_active">
             <image class="weui-grid__icon" src="/images/menu01.png" />
             <view class="weui-grid__label">Grid</view>
          </navigator>
          
          <navigator url="" class="weui-grid" hover-class="weui-grid_active">
             <image class="weui-grid__icon" src="/images/menu02.png" />
             <view class="weui-grid__label">Grid</view>
          </navigator>
          <navigator url="" class="weui-grid" hover-class="weui-grid_active">
             <image class="weui-grid__icon" src="/images/menu03.png" />
             <view class="weui-grid__label">Grid</view>
          </navigator>
          <navigator url="" class="weui-grid" hover-class="weui-grid_active">
             <image class="weui-grid__icon" src="/images/menu04.png" />
             <view class="weui-grid__label">Grid</view>
          </navigator>
          <navigator url="" class="weui-grid" hover-class="weui-grid_active">
             <image class="weui-grid__icon" src="/images/menu05.png" />
             <view class="weui-grid__label">Grid</view>
          </navigator>
          <navigator url="" class="weui-grid" hover-class="weui-grid_active">
             <image class="weui-grid__icon" src="/images/menu06.png" />
             <view class="weui-grid__label">Grid</view>
          </navigator>  
        </view>
    </view>    
</view>


上一篇: weui flex的布局和样式教程 下一篇: weui icon图标使用教程
毕业设计网             广告联系QQ:45157718(微信同号)