.wrapper {
    display: grid;/*产生一个块级的网格*/
    grid-template-columns: repeat(3, 1fr);/*利用空格分隔的值定义网格的列和行。
                                            grid-template-columns和grid-template-rows属性来定义网格中的行和列。这些属性定义了网格的轨道。
                                            一个网格轨道就是网格中任意两条线之间的空间。
                                            值的大小代表轨道的大小,并且他们之间的空格表示网格线*/
    grid-gap: 10px;
    grid-auto-rows: minmax(100px, auto);/*用minmax()作为grid-auto-rows的值。
                                        自动创建的行高将会是最小100px,最大为auto。
                                        用auto意味着行的尺寸将会根据内容的大小来自动变换。*/
  }
  .one {
    grid-column: 1 / 60;/*设置网格项目列方向的开始位置为1的网格线和结束为60的网格线*/
    grid-row: 1;
    background-color: brown/*颜色为brown*/
  }
  .two {
    grid-column: 2 / 4;/*同上*/
    grid-row: 1 / 3;
    background-color:blue
  }
  .three {
    grid-column: 1;
    grid-row: 2 / 5;
    background-color: brown
  }
  .four {
    grid-column: 3;
    grid-row: 3;
    background-color: brown
  }
  .five {
    grid-column: 2;
    grid-row: 4;
    background-color: brown
  }
  .six {
    grid-column: 3;
    grid-row: 4;
    background-color: brown
  }
  /*colum列*/

关于Grid Layout的更多相关文章

  1. CSS3 GRID LAYOUT

    CSS3 GRID LAYOUT http://www.w3cplus.com/blog/tags/356.html 中国首个开源 HTML5 跨屏前端框架 http://amazeui.org/

  2. 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 ...

  3. Unity3D 使用 UI 的 Grid Layout Group 组件。

    1.首先创建一个容器,用于存放列表项的内容. 这里使用 Panel 来做为容器. 这里要注意! “Grid Layout Group”是要增加在容器的游戏对象里. 同时,只有容器对象的子对象才有排列效 ...

  4. WPF笔记(2.4 Grid)——Layout

    原文:WPF笔记(2.4 Grid)--Layout 第一章已经简单介绍过这个容器,这一节详细介绍.Grid一般是用表格(Grid.Row 和Grid.Column )的,比StackPanel更细致 ...

  5. flexbox与grid layout的区别

    flexbox是一种针对一维的局部布局,以轴为核心的弹性布局. grid layout是二维的更加全面的网格布局,

  6. CSS: Grid Layout Module

    Grid Layout The CSS Grid Layout Module offers a grid-based layout system, with rows and columns, mak ...

  7. [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  ...

  8. [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 ...

  9. [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.

  10. [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 ...

随机推荐

  1. 两两交换链表中的节点(java实现)

    题目: 给定一个链表,两两交换其中相邻的节点,并返回交换后的链表. 你不能只是单纯的改变节点内部的值,而是需要实际的进行节点交换. 示例: 给定 1->2->3->4, 你应该返回 ...

  2. 20175317 MyCP(课下作业,必做)

    一.题目要求 编写MyCP.java 实现类似Linux下cp XXX1 XXX2的功能,要求MyCP支持两个参数: java MyCP -tx XXX1.txt XXX2.bin 用来把文本文件(内 ...

  3. vs2015编译caffe

    有些时候,需要在python3的环境下import caffe,需要用vs2015在python3的环境下,编译pycaffe. microsoft的windows版本的caffe,依赖的库Nuget ...

  4. django+nginx+gunicorn+pipenv微信小程序实践笔记

    一.我采用pipenv来管理虚拟环境,在本地新建虚拟环境: mkdir wxProject #进入环境目录,创建虚拟环境 pipenv install #激活虚拟环境 pipenv shell #然后 ...

  5. Confluence 6 升级中的一些常见问题

    升级的时候遇到了问题了吗? 如果你想尝试重新进行升级的话,你需要首先重新恢复老的备份.不要尝试再次对 Confluence 进行升级或者在升级失败后重新启动老的 Confluence.  在升级过程中 ...

  6. git同时存在两个账号(在同一台电脑上)——三步完成

    目录 1.首先是常规设置 2.同时添加两个账号 3.最后一步,配置~/.ssh/config文件 4.补充:有时因为设置了全局账号,因此需要清除 由于本人有连个git账号,个人github账号和公司g ...

  7. C语言 九九乘法表

    #include <stdio.h> #include <stdlib.h> #include <conio.h> int main() { int i,j,k; ...

  8. laravle 整合 thrift

    1,安装thrift https://www.cnblogs.com/sunlong88/p/9965522.html 2,生成 RPC文件 thrift -r --out ./app --gen p ...

  9. 1.moocs

    “三巨头”:Coursera.edX和Udacity Coursera:http://www.coursera.org 目前发展最大的MOOCs平台,拥有相近500门来自世界各地大学的课程,门类丰富, ...

  10. Linux的常识

    用到$是环境变量查询的开头 # echo $LANG查看编码 ls -l 是查看本地的所有文件的目录 以list的形式罗列出来 cd .. 上一层的目录 查看当前目录下有哪些文件 ll 等于ls -l ...