.wrapper { display:grid; grid-gap:10px; grid-template-columns:100px 100px 100px; grid-template-rows:100px 100px 100px; } .wrapper div { background:#999; } .item1 { grid-column:1/3; } .item3 { grid-row:2/4; } .item4 { grid-column:2/4; }
九宫格有4*4条线组成,因此子元素的值为1~4