Last active
March 22, 2018 15:19
-
-
Save julia-r/b547a39d3f7109f670318aeaf381a577 to your computer and use it in GitHub Desktop.
CSS Grid
This file contains 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
/** | |
* CSS Grid | |
*/ | |
.container { | |
display: grid; | |
grid-template-columns: repeat(3, 1fr); | |
grid-template-rows: repeat(5, 1fr); | |
} | |
.item:nth-child(2){ | |
grid-column: 2 / 4; | |
grid-row: 1 / 3; | |
} | |
.container { | |
background-color: lightblue; | |
width: 100vw; | |
height: 100vh; | |
margin: 0; | |
} | |
.item { | |
background-color: blue; | |
margin: 5px; | |
color: white; | |
font-size: 50px; | |
line-height: 100px; | |
text-align: center; | |
font-family: monospace; | |
} | |
body { | |
margin: 0 | |
} |
This file contains 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
<div class="container"> | |
<div class="item">1</div> | |
<div class="item">2</div> | |
<div class="item">3</div> | |
<div class="item">4</div> | |
<div class="item">5</div> | |
<div class="item">6</div> | |
<div class="item">7</div> | |
<div class="item">8</div> | |
<div class="item">9</div> | |
<div class="item">10</div> | |
</div> |
This file contains 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
// alert('Hello world!'); |
This file contains 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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment