1.理解flex的容器和元素
flex container: flex 容器 item:flex 元素
![](https://img.haomeiwen.com/i1828389/80feb58f2457370b.png)
//默认情况从左到右主轴从上到下交叉轴。
1.flex-direction 决定元素的排列方向
2.flex-warp 决定元素如何换行
3.flex-flow 是flex-direction 和flex-wrap的简写
4.justufy-content 决定元素在主轴上的对齐方式
5.aligh-items元素在交叉轴上的对齐方式。
![](https://img.haomeiwen.com/i1828389/39189dd5452f9db2.png)
需注意使用flex容器内元素,即flex item的float,clear、vertical-align属性将失效。
网友评论