CSS Flexbox
Basic Term
Basic Concept
CSS for container
.container {
display: flex; /* or inline-flex */
}
.container {
flex-direction: row | row-reverse | column | column-reverse;
}
.container {
flex-wrap: nowrap | wrap | wrap-reverse;
}
.container {
flex-flow: <‘flex-direction’> || <‘flex-wrap’>
}
.container {
justify-content: flex-start | flex-end | center | space-between | space-around | space-evenly;
}
.container {
align-items: stretch | flex-start | flex-end | center | baseline;
}
.container {
align-content: flex-start | flex-end | center | space-between | space-around | stretch;
}
CSS for items
.item {
order: <integer>; /* default is 0 */
}
.item {
flex-grow: <number>; /* default 0 */
}
.item {
flex-shrink: <number>; /* default 1 */
}
.item {
flex-basis: <length> | auto; /* default auto */
}
.item {
flex: none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]
}
.item {
align-self: auto | flex-start | flex-end | center | baseline | stretch;
}
ref