在flex之前用
float + clear
position relative + absolute
display inline-block
負(fù)margin
flex (flexible:彈性凰萨,靈活)
1.與方向無關(guān)
2.空間自動分配武通,自動對齊
3.簡單的線性布局
flex container 的屬性
flex-direction 方向
flex-direction: column-reverse冶忱;| column|row|row-reverse;
flex-wrap 換行
wrap|nowrap
flex-flow 上面兩個的簡寫
justify-content 主軸方向?qū)R方式
space-between|space-around|flex-start|flex-end|center
align-items 側(cè)軸對齊方式
align-content 多行/列內(nèi)容對齊方式(用得較少)
http://js.jirengu.com/jiluk/4/edit
flex item 的屬性
flex-grow 增長比例(空間過多時)
flex-shrink 收縮比例(空間不夠是)
flex-basis 默認(rèn)大星羟埂(一般不用)
flex 上面三個的縮寫
order 順序(代表雙飛翼)
align-self 自身的對齊方式
http://js.jirengu.com/fogol/2/edit
http://js.jirengu.com/fogol/3/edit
1.手機(jī)頁面布局
http://js.jirengu.com/kezan/2/edit
2.產(chǎn)品列表
http://js.jirengu.com/kosos/2/edit