.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. postman(十):配置jenkins自动发送邮件(邮件包含测试报告)

    继续说一下jenkins与postman的集成 上一篇通过jenkins远程执行postman导出的脚本,并把html报告指定输出到了jenkins对应的job工作空间,接下来配置一下当jenkins ...

  2. Facebook主页照片和封面照片的尺寸要求

    为什么好好的照片上传到Facebook后效果总不理想?为了避免你的照片在上传时被压缩,建议你尽量调整一下图片大小和格式,下面一起来看看Facebook主页照片和封面照片的尺寸要求. 1. Facebo ...

  3. 3D视图的2D展示

    效果图:预览 :预览 如何在2d界面显示3d图形? 如果把屏幕的中心作为视点的中心位置,那由远及近的物体应该是逐渐缩小的,而且是逐渐模糊的, 我们首先获取元素相对于中心点的距离,然后抽取这个距离的百分 ...

  4. spring boot2.0(一 ) 基础环境搭建

    1.基础配置 开发环境:window jdk版本:1.8(spring boot2.0最低要求1.8) 开发工具:eclipse 构建方式:maven3 2.POM配置文件 <project x ...

  5. SWUST OJ(1035)

    定位顺序表中最大和最小值 #include<iostream> #include<cstdlib> using namespace std; int main(int argc ...

  6. echarts常用方法,饼图切换圆环中文字(三)

    在echarts的饼图应用时,遇到过一个需求就是鼠标移到半环上可以切换环中的文字,同时支持legend点击事件.误区是,鼠标移动到环上重新渲染option,以切换内部的文字.重新渲染option的做法 ...

  7. 基于C#简单实现多个word文件和Excel文件的全局字符串替换

    公司整理文档工作中,出现了一个需要使用全局字符替换多个word文档.excel文档中的内容的需求.虽然office.WPS都有全局替换的功能(ctrl+h),但是文件过多,且需要替换多次,工作量还是比 ...

  8. play framework 笔记

    @main("Hello")调用 main.scala.hmtl,页面名称 Hello conf/routes 文件定义了映射规则 参数的传递入口在 controller 的方法中 ...

  9. 常用js函数开始收集~

    获取样式: var getStyle=function(ele,atr){ return typeof(ele)=='undefined'?0: ele.currentStyle? ele.curre ...

  10. day2 购物车

    需求: 商家入口: 1.商品列表永久保存(暂时使用存储在文件,也可以使用sqlite)里. 2.商家可以增加商品,也可以修改商品价格 买家入口: 1.购物车信息永久保存,暂时使用存储在文件,也可以使用 ...