kenu
46k
2019-08-06 22:24:06
0
1204

CSS Flexbox 소개합니다.


OKdevTV

CSS Flexbox

Basic Term

basic term

Basic Concept

  • Container
container
  • Item
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

3
0
  • 댓글 0

  • 로그인을 하시면 댓글을 등록할 수 있습니다.