Last active
December 18, 2015 14:18
-
-
Save selvagsz/5795691 to your computer and use it in GitHub Desktop.
A CodePen by Hugo Giraudel. Demo Flexbox 1
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
<ul class="flex-container"> | |
<li class="flex-item item1">1</li> | |
<li class="flex-item item2">2</li> | |
<li class="flex-item item3">3</li> | |
<li class="flex-item item4">4</li> | |
<li class="flex-item item5">5</li> | |
<li class="flex-item item6">6</li> | |
</ul> |
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
.flex-container { | |
padding: 10px; | |
list-style: none; | |
display: -webkit-box; | |
display: -moz-box; | |
display: -ms-flexbox; | |
display: -webkit-flex; | |
display: flex; | |
-webkit-flex-flow: row wrap; | |
justify-content: space-between; | |
} | |
.flex-item { | |
background: tomato; | |
padding: 5px; | |
height: 150px; | |
margin-top: 10px; | |
line-height: 150px; | |
color: white; | |
font-weight: bold; | |
font-size: 3em; | |
text-align: center; | |
&.item1{ | |
width: 25%; | |
} | |
&.item2{ | |
width:10%; | |
} | |
&.item3{ | |
width:10%; | |
} | |
&.item4{ | |
width: 10%; | |
// flex-grow:; | |
} | |
&.item5{ | |
width: 10%; | |
} | |
&.item6{ | |
width: 20%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment