Created
January 5, 2018 18:37
-
-
Save olvap/eb132fbd5bbda5bc48967d10e34034e6 to your computer and use it in GitHub Desktop.
// source http://jsbin.com/qubetas
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.item1 { grid-area: header; } | |
.item2 { grid-area: menu; } | |
.item3 { grid-area: main; } | |
.item4 { grid-area: right; } | |
.item5 { grid-area: footer; } | |
.grid-container { | |
display: grid; | |
grid-template-areas: | |
'header header header' | |
'main main main' | |
'footer footer footer'; | |
grid-gap: 10px; | |
background-color: #2196F3; | |
padding: 10px; | |
} | |
.grid-container > div { | |
background-color: rgba(255, 255, 255, 0.8); | |
text-align: center; | |
padding: 20px 0; | |
font-size: 30px; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>Grid Layout</h1> | |
<p>This grid layout contains six columns and three rows:</p> | |
<div class="grid-container"> | |
<div class="item1">Header</div> | |
<div class="item3">Main</div> | |
<div class="item5">Footer</div> | |
</div> | |
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.item1 { grid-area: header; } | |
.item2 { grid-area: menu; } | |
.item3 { grid-area: main; } | |
.item4 { grid-area: right; } | |
.item5 { grid-area: footer; } | |
.grid-container { | |
display: grid; | |
grid-template-areas: | |
'header header header' | |
'main main main' | |
'footer footer footer'; | |
grid-gap: 10px; | |
background-color: #2196F3; | |
padding: 10px; | |
} | |
.grid-container > div { | |
background-color: rgba(255, 255, 255, 0.8); | |
text-align: center; | |
padding: 20px 0; | |
font-size: 30px; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>Grid Layout</h1> | |
<p>This grid layout contains six columns and three rows:</p> | |
<div class="grid-container"> | |
<div class="item1">Header</div> | |
<div class="item3">Main</div> | |
<div class="item5">Footer</div> | |
</div> | |
</body> | |
</html> | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment