CSS Flexbox 彈性盒子模型

CSS Flexbox 彈性盒子模型

設置元素樣式爲 display: flex 或 display: inline-flex, 讓元素變成flex容器, 從而能夠經過flex模式佈局它的子元素.佈局

flex-direction:

值    row | row-reverse | column | column-reverse
默認值   rowflex

flex-wrap:

值    nowrap | wrap | wrap-reverse
默認值  nowrapspa

flex-flow:

值    <flex-direction> ‖ <flex-wrap>
默認值  row nowrap對象

Flex子對象分佈

justify-content:

值    flex-start | flex-end | center | space-between | space-around |space-evenly
默認值   flex-startit

align-items:

值    flex-start | flex-end | center | baseline | stretch
默認值  stretch io

align-self:

值    auto |flex-start | flex-end | center | baseline | stretch
默認值  auto容器

align-content:

值    flex-start | flex-end | center | space-between | space-around |space-evenly | stretch
默認值  stretch樣式

flex-grow:

值    <number>
默認值  0di

flex-shrink:

值    <number>
默認值  1co

flex-basic: <width>

值    auto | <length> | <percentage>
默認值  auto

flex:

值    [ <flex-grow> <flex-shrink>? ‖ <flex-basis> ] | none默認值  0 1 auto

相關文章
相關標籤/搜索