flex 彈性盒子

Leon Aries發表於2018-11-22

flex containner 容器   、 flex item 內容

flex-direction  預設值為row  水平排列       column 豎直排列

row-reverse  column-reverse  子元素顛倒排列(改變了主軸方向)

justify-content 主要用來控制item主軸的對齊方向

flex-start    flex-end    center 居中分佈    space-between 平均分佈   space-around  等距分佈(每一個item元素的兩邊的距離是相等的)

主軸  交叉軸  (row時  水平方向為主軸   column時  豎直方向為主軸)

align-items  主要用於控制item交叉軸的對齊方向

flex-start flex-end  center    baseline 文字底部基線對齊       stretch 拉伸

flex-wrap  

warp   nowarp 超過寬度以後是否自動換行


相關文章