可折叠卡牌合理布局在PC版网站内将会不普遍,可是手中机版,小显示屏的网页页面访问会大发异彩。
AmazeUI也出示了可折叠卡牌合理布局,尽管官方网站上面有事例,可是这类可折叠卡牌合理布局,融合內容目录、报表部件還是必须一番时间。
例如以下图,运用AmazeUI的可折叠卡牌合理布局,融合其出示的內容目录与报表部件。
全部网页页面的编码以下:
<!--应用HTML5开发设计--> <!doctype html> <html class="no-js"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!--全自动适应移动显示屏--> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <!--优先选择应用webkit核心3D渲染--> <meta name="renderer" content="webkit"> <!--不必被百度搜索转换格式--> <meta http-equiv="Cache-Control" content="no-siteapp"/> <!--下列才算是引进amazeui資源--> <link rel="stylesheet" href="assets/css/amazeui.min.css"> <link rel="stylesheet" href="assets/css/app.css"> <!--引进js的情况下要留意,务必先引进jQuery,再引进amazeui,由于这一架构是根据jQuery开发设计的--> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/amazeui.min.js"></script> <title>可折叠合理布局下的內容目录、报表</title> </head> <body> <h1>可折叠卡牌合理布局</h1> <div data-am-widget="accordion" class="am-accordion am-accordion-gapped"> <!--这儿是表明题目的情况色调是深灰色--> <dl class="am-accordion-item am-active"> <dt class="am-accordion-title">卡牌1-文本</dt> <!--这儿表明这一控制面板默认设置是开启情况--> <dd class="am-accordion-bd am-collapse am-in"> <div class="am-accordion-content"> <!--內容在这里里写--> 实属文本 </div> </dd> </dl> <dl class="am-accordion-item"> <dt class="am-accordion-title">卡牌2-內容目录</dt> <dd class="am-accordion-bd am-collapse"> <!--假如这一可折叠合理布局里边采用的并不是实属的文档,务必再加一个margin-bottom:-20px削去底端的空白页--> <!--采用內容目录得话,不必加class="am-accordion-content"特性--> <div style="margin-bottom:-20px"> <div class="am-list-news-bd"> <ul class="am-list"> <li class=" am-list-item-dated"> <a href="##" class="am-list-item-hd">题目1</a> <span class="am-list-date">2015-05-12</span> </li> <li class=" am-list-item-dated"> <a href="##" class="am-list-item-hd">较长较长较长较长较长较长较长较长较长较长较长较长较长较长较长较长较长较长题目2</a> <span class="am-list-date">2015-05-12</span> </li> <li class=" am-list-item-dated"> <a href="##" class="am-list-item-hd">题目3</a> <span class="am-list-date">2015-05-12</span> </li> </ul> </div> </div> </dd> </dl> <dl class="am-accordion-item"> <dt class="am-accordion-title">卡牌3-报表</dt> <dd class="am-accordion-bd am-collapse "> <!--am-table-bordered意味着报表列与列中间有线区划,am-table-striped意味着报表灰白两色--> <div class="am-accordion-content" style="margin-bottom:-20px"> <table class="am-table am-table-radius am-table-striped"> <thead> <tr> <!--这儿与HTML一样,务必设定好每一行的报表总宽--> <th width="33%">表头1</th> <th width="33%">表头2</th> <th>表头3</th> </tr> </thead> <tbody> <tr> <td>內容1</td> <td>较长较长较长內容2</td> <td>內容3</td> </tr> <tr> <td>內容1</td> <td>较长较长较长较长较长较长较长较长较长较长较长较长较长较长较长较长较长较长內容2</td> <td>內容3</td> </tr> <tr> <td>內容1</td> <td>较长较长较长內容2</td> <td>內容3</td> </tr> </tbody> </table> </div> </dd> </dl> </div> </body> </html>
重要的地区,注解都是有注解了。也出示了较长內容的解决方法。
dl-dt-dd是HTML中华绿色生态的目录合理布局,与ul-li这一组是一样影响力,可是用到少,将会给人遗忘了。
假如AmazeUI的可折叠卡牌合理布局里边要融合部件,务必清除底端那20px的留白艺术,不然难以看的。觉得这一部件专业为文本设定的,架构的原义不期待你融合物品。
同时报表留意设定好第一行的每个总宽,以要求好各行。
到此这篇有关AmazeUI可折叠卡牌合理布局,融合內容目录、报表部件完成的文章内容就详细介绍到这了,大量有关AmazeUI可折叠卡牌合理布局內容请检索脚本制作之家之前的文章内容或再次访问下边的有关文章内容,期待大伙儿之后多多的适用脚本制作之家!