AmazeUI实现网格的案例

小编给大家分享一下AmazeUI实现网格的案例,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!

AmazeUI 网格的实现示例,具体如下:

<!doctypehtml>
<htmlclass="no-js">
<head>
<metacharset="utf-8">
<metahttp-equiv="X-UA-Compatible"content="IE=edge">
<metaname="description"content="">
<metaname="keywords"content="">
<metaname="viewport"content="width=device-width,initial-scale=1">
<title>网格</title>
<metaname="renderer"content="webkit">
<metahttp-equiv="Cache-Control"content="no-siteapp"/>
<linkrel="icon"type="image/png"href="assets/i/favicon.png">
<metaname="mobile-web-app-capable"content="yes">
<linkrel="icon"sizes="192x192"href="assets/i/app-icon72x72@2x.png">
<metaname="apple-mobile-web-app-capable"content="yes">
<metaname="apple-mobile-web-app-status-bar-style"content="black">
<metaname="apple-mobile-web-app-title"content="AmazeUI"/>
<linkrel="apple-touch-icon-precomposed"href="assets/i/app-icon72x72@2x.png">
<metaname="msapplication-TileImage"content="assets/i/app-icon72x72@2x.png">
<metaname="msapplication-TileColor"content="#0e90d2">
<linkrel="stylesheet"href="assets/css/amazeui.min.css">
<style>
div>div:nth-child(1){background-color:#06f;}
div>div:nth-child(2){background-color:#0f6;}
div>div:nth-child(3){background-color:#60f;}
div>div:nth-child(4){background-color:#6f0;}
div>div:nth-child(5){background-color:#f60;}
div>div:nth-child(6){background-color:#f06;}
</style>
</head>
<body>
<h4>示例1:一个基本的网格</h4>
<divclass="am-g">
<divclass="am-u-sm-4">4</div>
<divclass="am-u-sm-8">8</div>
</div>

<h4>示例2:不同区间不同的划分比例</h4>
<divclass="am-gdoc-am-g">
<divclass="am-u-sm-6am-u-md-4am-u-lg-3">sm-6md-4lg-3</div>
<divclass="am-u-sm-6am-u-md-8am-u-lg-9">sm-6md-8lg-9</div>
</div>

<h4>示例3:限制宽度的网格</h4>
<divclass="am-gam-g-fixed">
<divclass="am-u-sm-4">4</div>
<divclass="am-u-sm-8">8</div>
</div>

<h5>示例4:容器</h5>
<divclass="am-container">
<divclass="am-g">
<divclass="am-u-sm-6">.am-u-sm-6</div>
<divclass="am-u-sm-6">.am-u-sm-6</div>
</div>
</div>

<h4>示例5:不足12份的网格</h4>
<!--未添加.am-u-end的情形-->
<divclass="am-g">
<divclass="am-u-sm-3">3</div>
<divclass="am-u-sm-3">3</div>
<divclass="am-u-sm-3">3</div>
</div>
<!--添加.am-u-end后-->
<divclass="am-g">
<divclass="am-u-sm-3">3</div>
<divclass="am-u-sm-3">3</div>
<divclass="am-u-sm-3am-u-end">3</div>
</div>

<h4>示例6:响应式辅助类控制元素显隐</h4>
<divclass="am-g">
<divclass="am-u-sm-2am-u-lg-4">
<spanclass="am-show-md-down">sm-2</span>
<spanclass="am-show-lg-only">lg-4</span>
</div>
<divclass="am-u-sm-4am-u-lg-4">sm4lg4</div>
<divclass="am-u-sm-6am-u-lg-4">
<spanclass="am-show-md-down">sm-6</span>
<spanclass="am-show-lg-only">lg-4</span>
</div>
</div>
<divclass="am-g">
<divclass="am-u-lg-3">
<spanclass="am-show-md-down">sm-full</span>
<spanclass="am-show-lg-only">lg-3</span>
</div>
<divclass="am-u-lg-6">
<spanclass="am-show-md-down">sm-full</span>
<spanclass="am-show-lg-only">lg-6</span>
</div>
<divclass="am-u-lg-3">
<spanclass="am-show-md-down">sm-full</span>
<spanclass="am-show-lg-only">lg-3</span>
</div>
</div>
<divclass="am-g">
<divclass="am-u-sm-6am-u-lg-2">
<spanclass="am-show-md-down">6</span>
<spanclass="am-hide-md-down">2</span>
</div>
<divclass="am-u-sm-6am-u-lg-8">
<spanclass="am-show-md-down">6</span>
<spanclass="am-hide-md-down">8</span>
</div>
<divclass="am-u-sm-12am-u-lg-2">
<spanclass="am-show-md-down">full</span>
<spanclass="am-hide-md-down">2</span>
</div>
</div>
<divclass="am-g">
<divclass="am-u-sm-3">3</div>
<divclass="am-u-sm-9">9</div>
</div>
<divclass="am-g">
<divclass="am-u-lg-4">
<spanclass="am-show-md-down">full</span>
<spanclass="am-hide-md-down">4</span>
</div>
<divclass="am-u-lg-8">
<spanclass="am-show-md-down">full</span>
<spanclass="am-hide-md-down">8</span>
</div>
</div>
<divclass="am-g">
<divclass="am-u-sm-6am-u-lg-5">
<spanclass="am-show-md-down">6</span>
<spanclass="am-hide-md-down">5</span>
</div>
<divclass="am-u-sm-6am-u-lg-7">
<spanclass="am-show-md-down">6</span>
<spanclass="am-hide-md-down">7</span>
</div>
</div>
<divclass="am-g">
<divclass="am-u-lg-6">
<spanclass="am-show-md-down">full</span>
<spanclass="am-hide-md-down">6</span>
</div>
<divclass="am-u-lg-6">
<spanclass="am-show-md-down">full</span>
<spanclass="am-hide-md-down">6</span>
</div>
</div>

<h4>示例7:列边距啪啪啪</h4>
<divclass="am-g">
<divclass="am-u-sm-1">1</div>
<divclass="am-u-sm-11">11</div>
</div>
<divclass="am-g">
<divclass="am-u-sm-1">1</div>
<divclass="am-u-sm-10am-u-sm-offset-1">10,offset1</div>
</div>
<divclass="am-g">
<divclass="am-u-sm-1">1</div>
<divclass="am-u-sm-9am-u-sm-offset-2">9,offset2</div>
</div>
<divclass="am-g">
<divclass="am-u-sm-1">1</div>
<divclass="am-u-sm-8am-u-sm-offset-3">8,offset3</div>
</div>
<divclass="am-g">
<divclass="am-u-sm-1">1</div>
<divclass="am-u-sm-7am-u-sm-offset-4">7,offset4</div>
</div>

<h4>示例8:居中,Tobeornottobe</h4>
<!--.am-u-sm-centered始终居中-->
<divclass="am-g">
<divclass="am-u-sm-3am-u-sm-centered">3centered</div>
</div>
<!--.am-u-lg-centered大于1024时居中-->
<divclass="am-g">
<divclass="am-u-sm-6am-u-lg-centered">6centered</div>
</div>
<!--大于1024时不居中-->
<divclass="am-g">
<divclass="am-u-sm-9am-u-sm-centeredam-u-lg-uncentered">9md-down-centered</div>
</div>
<!--始终居中-->
<divclass="am-g">
<divclass="am-u-sm-11am-u-sm-centered">11centered</div>
</div>

<h4>示例9:结构与表现表里不一</h4>
<!--
结构中main在前,sidebar在后
通过push/pull,在medium区间将sidebar显示到左侧,main显示到右侧
large区间reset回结构排序
-->
<divclass="am-g">
<divclass="am-u-md-8am-u-md-push-4am-u-lg-reset-order">8main</div>
<divclass="am-u-md-4am-u-md-pull-8am-u-lg-reset-order">4sidebar</div>
</div>

<h4>示例10:没有内边距的列</h4>
<divclass="am-gam-g-collapse">
<divclass="am-u-sm-6">.am-u-sm-6</div>
<divclass="am-u-sm-6">.am-u-sm-6</div>
</div>
<!--[if(gteIE9)|!(IE)]><!-->
<scriptsrc="assets/js/jquery.min.js"></script>
<!--<![endif]-->
<!--[iflteIE8]>
<scriptsrc="assets/ie8/jquery.min.js"></script>
<scriptsrc="assets/ie8/modernizr.js"></script>
<scriptsrc="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->
<scriptsrc="assets/js/amazeui.min.js"></script>
</body>
</html>

效果图:

AmazeUI实现网格的案例

以上是“AmazeUI实现网格的案例”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注恰卡编程网行业资讯频道!

发布于 2021-03-21 22:36:43
收藏
分享
海报
0 条评论
174
上一篇:AmazeUI面板怎么实现 下一篇:如何使用SVG实现提示框功能
目录

    0 条评论

    本站已关闭游客评论,请登录或者注册后再评论吧~

    忘记密码?

    图形验证码