ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# 宫格 [TOC] ### 九宫格 ![](https://box.kancloud.cn/2016-08-26_57bf9c7435677.png) 代码如下: ``` <div class="aui-content"> <ul class="aui-grid-nine"> <li class="aui-col-xs-4 aui-text-center"> <span class="aui-iconfont aui-icon-edit aui-text-primary"></span> <p>栏目</p> </li> <li class="aui-col-xs-4 aui-text-center"> <span class="aui-iconfont aui-icon-emoji aui-text-danger"></span> <p>栏目</p> </li> <li class="aui-col-xs-4 aui-text-center"> <span class="aui-iconfont aui-icon-favor aui-text-warning"></span> <p>栏目</p> </li> <li class="aui-col-xs-4 aui-text-center"> <span class="aui-iconfont aui-icon-phone aui-text-pink"></span> <p>栏目</p> </li> <li class="aui-col-xs-4 aui-text-center"> <span class="aui-iconfont aui-icon-taxi aui-text-dark"></span> <p>栏目</p> </li> <li class="aui-col-xs-4 aui-text-center"> <span class="aui-iconfont aui-icon-camera aui-text-info"></span> <p>栏目</p> </li> <li class="aui-col-xs-4 aui-text-center"> <span class="aui-iconfont aui-icon-like aui-text-blue"></span> <p>栏目</p> </li> <li class="aui-col-xs-4 aui-text-center"> <span class="aui-iconfont aui-icon-deliver aui-text-danger"></span> <p>栏目</p> </li> <li class="aui-col-xs-4 aui-text-center"> <span class="aui-iconfont aui-icon-evaluate aui-text-warning"></span> <p>栏目</p> </li> </ul> </div> ``` ### 十六宫格 ![](https://box.kancloud.cn/2016-08-26_57bf9c745a5ef.png) 相关代码如下: ``` <div class="aui-content"> <ul class="aui-grid-sixteen"> <li class="aui-col-xs-3 aui-text-center"> <span class="aui-iconfont aui-icon-pay aui-text-primary"></span> <p>栏目</p> </li> <li class="aui-col-xs-3 aui-text-center"> <span class="aui-iconfont aui-icon-send aui-text-danger"></span> <p>栏目</p> </li> <li class="aui-col-xs-3 aui-text-center"> <span class="aui-iconfont aui-icon-shop aui-text-warning"></span> <p>栏目</p> </li> <li class="aui-col-xs-3 aui-text-center"> <span class="aui-iconfont aui-icon-ticket aui-text-pink"></span> <p>栏目</p> </li> <li class="aui-col-xs-3 aui-text-center"> <span class="aui-iconfont aui-icon-cascades aui-text-dark"></span> <p>栏目</p> </li> <li class="aui-col-xs-3 aui-text-center"> <span class="aui-iconfont aui-icon-discover aui-text-info"></span> <p>栏目</p> </li> <li class="aui-col-xs-3 aui-text-center"> <span class="aui-iconfont aui-icon-scan aui-text-blue"></span> <p>栏目</p> </li> <li class="aui-col-xs-3 aui-text-center"> <span class="aui-iconfont aui-icon-settings aui-text-danger"></span> <p>栏目</p> </li> <li class="aui-col-xs-3 aui-text-center"> <span class="aui-iconfont aui-icon-form aui-text-warning"></span> <p>栏目</p> </li> <li class="aui-col-xs-3 aui-text-center"> <span class="aui-iconfont aui-icon-pic aui-text-warning"></span> <p>栏目</p> </li> <li class="aui-col-xs-3 aui-text-center"> <span class="aui-iconfont aui-icon-filter aui-text-pink"></span> <p>栏目</p> </li> <li class="aui-col-xs-3 aui-text-center"> <span class="aui-iconfont aui-icon-footprint aui-text-dark"></span> <p>栏目</p> </li> <li class="aui-col-xs-3 aui-text-center"> <span class="aui-iconfont aui-icon-home aui-text-danger"></span> <p>栏目</p> </li> <li class="aui-col-xs-3 aui-text-center"> <span class="aui-iconfont aui-icon-profile aui-text-warning"></span> <p>栏目</p> </li> <li class="aui-col-xs-3 aui-text-center"> <span class="aui-iconfont aui-icon-qrcode aui-text-pink"></span> <p>栏目</p> </li> <li class="aui-col-xs-3 aui-text-center"> <span class="aui-iconfont aui-icon-service aui-text-dark"></span> <p>栏目</p> </li> </ul> </div> ``` ### 1、样式一 ![](https://box.kancloud.cn/2016-08-25_57beacf174667.png) 说明:首先采用的是 `div` ,其次用 css 的 `aui-col-xs-4`。 父级采用 `aui-content`。 代码如下 : ``` <style> .topmenu {background: #e74c3c;overflow: hidden;padding: 10px 0;margin-bottom: 0;} .topmenu .aui-iconfont, .topmenu p {color: #ffffff;} .topmenu .aui-iconfont {font-size: 1.6em;} </style> <div class="aui-content topmenu aui-text-center"> <div class="aui-col-xs-4"> <span class="aui-iconfont aui-icon-write"></span> <p>签到</p> </div> <div class="aui-col-xs-4"> <span class="aui-iconfont aui-icon-list"></span> <p>订单</p> </div> <div class="aui-col-xs-4"> <span class="aui-iconfont aui-icon-sponsor"></span> <p>提现</p> </div> </div> ``` ### 2、样式二 ![](https://box.kancloud.cn/2016-08-25_57beacf18c732.png) 说明:首先采用的是 `ul` 和 `li` ,其实采用 css 的 `aui-grid-sixteen` 和 `aui-col-xs-3`。 父级采用 `aui-content`。 代码如下: ``` <div class="aui-content"> <ul class="aui-grid-sixteen"> <li class="aui-col-xs-3 aui-text-center" tapmode onclick="openClassify('news','栏目一')"> <span class="aui-iconfont aui-icon-form aui-text-info"></span> <p>栏目一</p> </li> <li class="aui-col-xs-3 aui-text-center" tapmode onclick="openClassify('news','栏目二')"> <span class="aui-iconfont aui-icon-creativefill aui-text-success"></span> <p>栏目二</p> </li> <li class="aui-col-xs-3 aui-text-center" tapmode onclick="openClassify('news','栏目三')"> <span class="aui-iconfont aui-icon-similar aui-text-warning"></span> <p>栏目三</p> </li> <li class="aui-col-xs-3 aui-text-center" tapmode onclick="openClassify('news','栏目四')"> <span class="aui-iconfont aui-icon-countdownfill aui-text-info"></span> <p>栏目四</p> </li> <li class="aui-col-xs-3 aui-text-center" tapmode onclick="openClassify('news','栏目五')"> <span class="aui-iconfont aui-icon-taoxiaopu aui-text-danger"></span> <p>栏目五</p> </li> <li class="aui-col-xs-3 aui-text-center" tapmode onclick="openClassify('news','栏目六')"> <span class="aui-iconfont aui-icon-shopfill aui-text-info"></span> <p>栏目六</p> </li> <li class="aui-col-xs-3 aui-text-center" tapmode onclick="openClassify('news','栏目七')"> <!-- <img src="../image/muchang.png" class="muchang" /> --> <span class="aui-iconfont aui-icon-activityfill aui-text-success"></span> <p>栏目七</p> </li> <li class="aui-col-xs-3 aui-text-center" tapmode onclick="openClassify('news','栏目八')"> <span class="aui-iconfont aui-icon-all aui-text-warning"></span> <p>栏目八</p> </li> </ul> </div> ``` ### 3、样式三 ![](https://box.kancloud.cn/2016-08-25_57beacf1a36d3.png) 说明: 首先采用的是 `ul` 和 `li` , `ul`采用的暗 `aui-list-view` 和 `aui-grid-view` , `li`采用的是 `aui-list-view-cell aui-img aui-col-xs-4` 。 代码如下: ``` <div class="aui-content box"> <div class="aui-line-x"></div> <div class="box-title">今日特惠</div> <ul class="aui-list-view aui-grid-view"> <li class="aui-list-view-cell aui-img aui-col-xs-4" tapmode onclick="openGoods()"> <img class="aui-img-object" src="../../../image/demo1.png"> <div class="aui-img-body aui-text-left"> <!-- 商品名称商品名称商品名称商品名称 --> <p> <span class="goods-price aui-text-danger">¥<strong>88.88</strong>元</span> </p> </div> </li> <li class="aui-list-view-cell aui-img aui-col-xs-4" tapmode onclick="openGoods()"> <img class="aui-img-object" src="../../../image/demo2.png"> <div class="aui-img-body aui-text-left"> <!-- 商品名称商品名称商品名称商品名称 --> <p> <span class="goods-price aui-text-danger">¥<strong>88.88</strong>元</span> </p> </div> </li> <li class="aui-list-view-cell aui-img aui-col-xs-4" tapmode onclick="openGoods()"> <img class="aui-img-object" src="../../../image/demo3.png"> <div class="aui-img-body aui-text-left"> <!-- 商品名称商品名称商品名称商品名称 --> <p> <span class="goods-price aui-text-danger">¥<strong>88.88</strong>元</span> </p> </div> </li> </ul> <div class="aui-line-x"></div> </div> ```