flex弹性布局属性详解!

flex容器属性详解
flex-direction:决定元素的排列方向;
flex-wrap 决定原色如何换行(排列不下时);
flex-flow是: flex-direction 和 flex-wrap的简写;
justify-content 元素在主轴上的对齐方式;
align-items 元素在交叉轴的对齐方式;

flex元素属性详解
flex-grow 当有多余空间时,元素的放大比例;
flex-shirink当空间不足时,元素的缩小比例;
flex-basis 元素在主轴上占据的空间;
flex时grow / shrink / basis的简写;
order 定义元素的排列顺序;
align-self 定义元素自身的对齐方式;

容器属性

1、flex-direction:row/column; //决定 flex 元素的排列方式:横排/竖排(默认:row 横排)

div.com1{display: flex; flex-direction:row;}

猜你喜欢

转载自www.cnblogs.com/e0yu/p/9023499.html