CSS Flexbox

Basic Term

basic term

Basic Concept

container items

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

What Else?
inflearn react api server -50% 할인쿠폰: 15108-f2af1e086101 buy me a coffee