.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. c#数据库事务锁类型

    一.脏读.不可重复读.幻象读的区别   1.脏读:包含未提交数据的读取.例如,事务 a 更改了某行(数据库已发生更改,但尚未提交,有可能发生回滚),事务 b 在事务 a 提交更改之前读取已更改的行.如 ...

  2. mint修改host

    sudo xed /etc/hosts # Pycharm 0.0.0.0 account.jetbrains.com0.0.0.0 www.jetbrains.com #sublime text3 ...

  3. 使用vue实现自定义搜索功能

    实现效果如:http://www.ligerui.com/demos/filter/filter.htm 代码: <%@ Page Language="C#" AutoEve ...

  4. prometheus监控示例

    prometheus架构图 prometheus 各组件介绍 Prometheus Server: 使用pull方式采集监控数据,在该组件上配置监控数据的采集和告警规则. Client Library ...

  5. echarts常用方法,legend状态支持两张图片切换(四)

    在UI设计的时候,可能我们在使用echarts时,legend是用图片渲染的,未选中的legend是用置灰的图片展示的.即彩色图片,置灰图片交互切换. 主要代码如下: //图例事件 let lgdt ...

  6. 为什么Java的main方法必须是public static void?

    一. void 如下,像C, C++一样,将返回值类型改为int,再返回一个0,虽然编译通过,但是运行时会报错. 找到一种可理解的解释:方法的副作用和返回值类型.(http://www.cnblogs ...

  7. JS设置、获取和取消Cookie

    // 设置cookie   function setCookie(name, value, seconds, domain) {       seconds = seconds || 0; // se ...

  8. js设置radio单选框值选中

    html页面: <div> <label><input type="radio" name="sex" value="m ...

  9. Tensorflow计算加速

    在tensorflow里可以通过tf.device函数来指定每个运行的设备,可以是GPU也可以是CPU,比如CPU在tensorflow里的名称为/cpu:0,即便电脑里有多个CPU,tensorfl ...

  10. 九、Linux上软件安装

    1. 在Linux上安装JDK: [步骤一]:上传JDK到Linux的服务器. * 上传JDK * 卸载open-JDK java –version rpm -qa | grep java rpm - ...