(一)flex布局
1:flex弹性布局(容器的属性)
flex-direction
flex-wrap
flex-flow
justify-content(主轴的对齐方式)
align-items align-items属性定义项目在交叉轴上如何对齐。
align-content align-content属性定义了多根轴线的对齐方式。如果项目只有一根轴线,该属性不起作用。
2:flex-direction属性决定主轴的方向
flex-direction: row | row-reverse | column | column-reverse;
3:flex-wrap: nowrap | wrap | wrap-reverse;
4:flex-flow属性是flex-direction属性和flex-wrap属性的简写形式,默认值为row nowrap。
flex-flow: <flex-direction> || <flex-wrap>;
5:justify-content属性定义了项目在主轴上的对齐方式。//注意主轴侧轴
justify-content: flex-start | flex-end | center | space-between | space-around;
6:align-items: flex-start | flex-end | center | baseline | stretch;
align-items属性定义项目在交叉轴上如何对齐。(侧轴)
stretch(默认值):如果项目未设置高度或设为auto,将占满整个容器的高度。
7:align-content属性
align-content属性定义了多根轴线的对齐方式。如果项目只有一根轴线,该属性不起作用。
2:项目的属性()
order flex-grow flex-shrink flex-basis flex align-self