关于css:CSSflex

7次阅读

共计 658 个字符,预计需要花费 2 分钟才能阅读完成。

一、容器属性:

  • flex-direction

  • flex-wrap

  • flex-flow

  • justify-content

  • align-items

  • align-contents

1.1 flex-direction

决定容器成员的排列方向

属性值:

flex-direction: row | row-reverse | column | column-reverse;

1.2 flex-wrap

决定容器成员的换行规定

属性值:

flex-wrap: nowrap | wrap | wrap-reverse;

1.3 flex-flow

flex-direction 和 flex-wrap 的简写模式

默认属性值:

flex-flow: row nowrap;

1.4 justify-content

决定容器成员在 x 轴的对齐形式

属性值:

justify-content: flex-start | flex-end | center | space-between | space-around;

1.5 align-items

决定容器成员在 y 轴的对齐形式

属性值:

align-items: flex-start | flex-end | center | baseline | stretch;

1.6 align-contents

决定多行容器成员在 y 轴的对齐形式

属性值:

align-content: flex-start | flex-end | center | space-between | space-around | stretch;

二、容器成员属性:

  • order

  • flex-grow

  • flex-shrink

  • flex-basis

  • flex

  • align-self

正文完
 0