Skip to content

Instantly share code, notes, and snippets.

@zer0id0
Created February 12, 2019 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zer0id0/98976a3e9c81988d1fad967f1f6d6cf4 to your computer and use it in GitHub Desktop.
Save zer0id0/98976a3e9c81988d1fad967f1f6d6cf4 to your computer and use it in GitHub Desktop.
flex cheat sheet
@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