CSS flex属性
- flex-direction
决定主轴的方向(即项目的排列方式)
.box {
flex-direction: row | row-reverse | column | column-reverse
}
- flex-warp属性
默认情况下,项目都排在一条线上。flex-warp属性定义如果一条轴线排不下,如何换行
.box {
flex-warp: nowarp | warp | warp-reverse
}
3. justify-content属性
定义项目在主轴线上的对齐方式
.box {
justify-content: flex-start | flex-end | center | space-between | space-around
}
- align-item属性
align-item定义项目在交叉轴上如何对齐
.box {
align-item: flex-strat | flex-end | center | baseline | stretch
}