example 1 height width flex-direction column row column-revert row-revert justify-content flex-start flex-end center space-between space-around align-item flex-start flex-end center stretch baseline 1 2 3 4 5 6 example 2 拉長的時候紅色會變得比藍色長,但壓縮的時候卻是藍色變得比紅色長 outter width:300px item1(red) width:200px item2(blue) width:100px 1 2 簡單驗證一下 多出來的寬度分配,按grow比例:當伸長的長度(x) 大於 200(紅色,grow=1)+100(藍色,grow=2),則新長度的算法為 (x-200-100)/(1+2)*1+200 (x-200-100)/(1+2)*2+100 ❓問題 為甚麼一個有填滿,一個沒有: case1 指定寬度,沒有指定flex。