Created
February 12, 2019 13:36
-
-
Save zer0id0/98976a3e9c81988d1fad967f1f6d6cf4 to your computer and use it in GitHub Desktop.
flex cheat sheet
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
@media(min-width:468px){ | |
.container-1{ | |
display:flex; | |
/* | |
align-items:flex-start; | |
align-items:flex-end; | |
align-items:center; | |
flex-direction:column; | |
*/ | |
} | |
.container-2{ | |
display:flex; | |
/* | |
justify-content:flex-start; | |
justify-content:flex-end; | |
justify-content:center; | |
justify-content:space-around; | |
*/ | |
justify-content:space-between; | |
} | |
} | |
.container-3{ | |
display:flex; | |
flex-wrap:wrap; | |
justify-content:space-between; | |
} | |
.container-1 div, .container-2 div, .container-3 div{ | |
border:1px #ccc solid; | |
padding:10px; | |
} | |
.box-1{ | |
flex:2; | |
order:2; | |
} | |
.box-2{ | |
flex:1; | |
order:1; | |
} | |
.box-3{ | |
flex:1; | |
order: 3; | |
} | |
.container-2-box{ | |
flex-basis: 27%; | |
} | |
.container-3-box{ | |
flex-basis:12%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment