1 <!DOCTYPE HTML>2 <!DOCTYPE HTML>3 <HTML>4 <Head>5 <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8">6 <title>7 Grid Layout8 </title>9 <Linkrel= "stylesheet"href= "Grid layout. css">Ten One </Head> A <Body> - <Divclass= "wrapper"> - <Divclass= "One">One</Div> the <Divclass= "both">Both</Div> - <Divclass= "three">Three</Div> - <Divclass= "Four">Four</Div> - <Divclass= "Five">Five</Div> + <Divclass= "Six">Six</Div> - <Divclass= "Seven">Seven</Div> + <Divclass= "Eight">Eight</Div> A <Divclass= "Nine">Nine</Div> at </Div> - </Body> - </HTML>
. Wrapper{Display:Grid;Grid-template-columns:repeat (4,100px);/*grid-gap:10px;*/grid-auto-rows:100px;}. One{Display:Inline-block;width:500px;Height:100px;background:Red;Color:Black;Grid-column:1/span 4;Grid-row: the; }. the{Display:Inline-block;width:100px;Height:200px;background:Yellow;Color:Black;Grid-column: the;Grid-row:2/3; }. Three{Display:Inline-block;width:100px;Height:100px;background:Yellow;Color:Black;Grid-column:2/3;Grid-row:2/3; }. Four{Display:Inline-block;width:100px;Height:100px;background:Green;Color:Black;Grid-column:3/4;Grid-row:2/3; }. Five{Display:Inline-block;width:100px;Height:100px;background:Pink;Color:Black;Grid-column:4/5;Grid-row:2/3; }. Six{Display:Inline-block;width:100px;Height:200px;background:Lime;Color:Black;Grid-column:5/6;Grid-row:2/3; }. Seven{Display:Inline-block;width:100px;Height:100px;background:Blue;Color:Black;Grid-column:2/3;Grid-row:3/4; }. Eight{Display:Inline-block;width:100px;Height:100px;background:Purple;Color:Black;Grid-column:3/4;Grid-row:3/4; }. Nine{Display:Inline-block;width:100px;Height:100px;background:Seagreen;Color:Black;Grid-column:4/5;Grid-row:3/4; }
Grid layout of Grids