Created
December 27, 2017 15:47
-
-
Save v1w3/b74db716f6f6c002fc235085e8d2ed2d to your computer and use it in GitHub Desktop.
CSS3 Grid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section> | |
<div>Normal size</div> | |
<div>Normal size</div> | |
<div>Double width</div> | |
<div>Normal size</div> | |
<div>Double Width</div> | |
<div>Double Height</div> | |
<div>Normal size</div> | |
<div>Normal size</div> | |
<div>Normal size</div> | |
<div>Normal size</div> | |
<div>Double Width</div> | |
<div>Normal size</div> | |
<div>Double Width</div> | |
<div>Normal size</div> | |
<div>Normal size</div> | |
</section> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
section{ | |
display:grid; | |
grid-template-columns:repeat(5fr); | |
grid-gap: 0.5em | |
} | |
section div{ | |
background: #fff; | |
border: solid 0.2em #000; | |
height:50vh; | |
color:#000; | |
display:flex; | |
flex-direction:column; | |
justify-content:center; | |
text-align:center | |
} | |
section div:nth-child(3){ | |
grid-column:3/5; | |
grid-row:1; | |
} | |
section div:nth-child(5){ | |
grid-column:1/3; | |
grid-row:2; | |
} | |
section div:nth-child(6){ | |
grid-column:3; | |
grid-row:2/4; | |
height:98.7%; | |
} | |
section div:nth-child(11){ | |
grid-column:4/6; | |
grid-row:3; | |
} | |
section div:nth-child(13){ | |
grid-column:2/4; | |
grid-row:4; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment