grid-layout
<!-- 创建三个网格布局-->
.wrapper {
<!--创建一个网格布局 -->
display: grid;
<!--创建3列 且每列都等距 -->
grid-template-columns: repeat(3, 1fr);
<!--网格行列之间的距离是10px-->
grid-gap: 10px;
<!--网格项位于未明确指定大小的行中 则会创建grid-auto-rows来保存它,最小的宽度是100px -->
grid-auto-rows: minmax(100px, auto);
}
<!-- -->
.one {
<!--此网格列是1到3-->
grid-column: 1 / 3;
<!--此网格的行网格线是1-->
grid-row:;
}
.two {
grid-column: 2 / 4;
grid-row: 1 / 3;
}
.three {
grid-column:;
grid-row: 2 / 5;
}
.four {
grid-column:;
grid-row:;
}
.five {
grid-column:;
grid-row:;
}
.six {
grid-column:;
grid-row:;
}
此代码为自己理解的css的grid-layout 有问题欢迎提出·
grid-layout的更多相关文章
- CSS3 GRID LAYOUT
CSS3 GRID LAYOUT http://www.w3cplus.com/blog/tags/356.html 中国首个开源 HTML5 跨屏前端框架 http://amazeui.org/
- iphone Dev 开发实例9:Create Grid Layout Using UICollectionView in iOS 6
In this tutorial, we will build a simple app to display a collection of recipe photos in grid layout ...
- Unity3D 使用 UI 的 Grid Layout Group 组件。
1.首先创建一个容器,用于存放列表项的内容. 这里使用 Panel 来做为容器. 这里要注意! “Grid Layout Group”是要增加在容器的游戏对象里. 同时,只有容器对象的子对象才有排列效 ...
- WPF笔记(2.4 Grid)——Layout
原文:WPF笔记(2.4 Grid)--Layout 第一章已经简单介绍过这个容器,这一节详细介绍.Grid一般是用表格(Grid.Row 和Grid.Column )的,比StackPanel更细致 ...
- flexbox与grid layout的区别
flexbox是一种针对一维的局部布局,以轴为核心的弹性布局. grid layout是二维的更加全面的网格布局,
- CSS: Grid Layout Module
Grid Layout The CSS Grid Layout Module offers a grid-based layout system, with rows and columns, mak ...
- [Grid Layout] Use the repeat function to efficiently write grid-template values
We can use the repeat() function if we have repeating specifications for columns and rows. With the ...
- [Grid Layout] Describe a grid layout using named grid lines
We can use named grid lines to describe our grid layout. Let’s see how to apply this to our grid-tem ...
- [Grid Layout] Specify a grid gutter size with grid-gap
It’s beautifully straightforward to add a gutter to our grid layout. Let’s apply one with grid-gap.
- [CSS] Get up and running with CSS Grid Layout
We’ll discuss the display values pertinent to CSS Grid Layout – grid, inline-grid, and subgrid. Then ...
随机推荐
- Python装饰器的另类用法
之前有比较系统介绍过Python的装饰器(请查阅<详解Python装饰器>),本文算是一个补充.今天我们一起探讨一下装饰器的另类用法. 语法回顾 开始之前我们再将Python装饰器的语法回 ...
- 后台获取POST方式提交的JSON格式数据
1.直接使用request.getParamater()的方法获取(这种取参方式对于POST和GET的提交方式均适用): 2.通过请求体的IO流获取参数(这种方式只能用于POST,因为GET方式没有请 ...
- mongodb 数据自动备份
创建Mongodb数据库备份目录 mkdir -p ~/backup/mongod_bak/mongod_bak_now mkdir -p ~/backup/mongod_bak/mongod_bak ...
- BASE64加解密
- JDK 自带 - Commons Codec 地址:http://commons.apache.org/proper/commons-codec/download_codec.cgi - Bou ...
- “妄”眼欲穿之CSS 居中问题
妄:狂妄: 不会的东西只有怀着一颗狂妄的心,假装能把它看穿吧. 作为一个什么都不会的小白,为了学习,特别在拿来主义之后写一些对于某些css布局的总结,进一步加深对知识的记忆.知识是人类的共同财富,中华 ...
- CSS之垂直水平居中方法
//居中方法1 position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; width: 346px; height ...
- java笔记 -- 输入输出
读取输入: 如果想通过控制台进行输入, 首先需要构造一个Scanner对象.并与'标准输入流'System.in关联. 代码见下文代码块. Sanner (InputStream in) 用给定的输入 ...
- Windows 下 docker 部署 gitlab ci
一.安装 1. 安装 docker Docker下载 注意:Windows 10 家庭版获取 之前的版本不能直接安装 Docker ,而是需要去安装 Docker Toolbox 我这里安装的是 Do ...
- Cordova入门系列(四)自定义Cordova插件--showToast
前三篇Cordova入门系列,简单讲解了Cordova,以及如何调用Cordova插件,今天我们讲解一下如何自己做一个插件. 自定义插件,就是自己写一些安卓java代码,然后和js代码以及配置文件,封 ...
- HDU 5299 Circles Game
HDU 5299 思路: 圆扫描线+树上删边博弈 圆扫描线有以下四种情况,用set维护扫描线与圆的交点,重载小于号 代码: #pragma GCC optimize(2) #pragma GCC op ...