27 lines
698 B
Plaintext
27 lines
698 B
Plaintext
pc 移动端
|
||
|
||
display: inline-block
|
||
float: left: right;
|
||
|
||
flex(布局) + rem(尺寸)
|
||
|
||
flex 13 个css属性
|
||
|
||
display: flex 开启弹性盒子
|
||
|
||
用户父元素上(6个)
|
||
flex-direction 设置对齐方向 注意 align-items 和 justify-content 作用交换
|
||
flex-wrap 自动换行
|
||
flex-flow
|
||
justify-content 水平对齐
|
||
align-items 垂直对齐(单行的时候)
|
||
align-content 多行的时候设置垂直对齐
|
||
|
||
|
||
用户子元素上(6个)
|
||
order 数值越小越靠前
|
||
flex-grow 元素的放大比例(默认0)
|
||
flex-shrink 0 让元素不缩放(默认1 缩放)
|
||
flex-basis
|
||
flex flex: 1; 是 flex-grow 平替
|
||
align-self 让元素不遵守 父元素上的 align-items |