2016-09-18 37 views
-1

我使用flex來對齊我的元素。 #sentinels是最外面的容器,每行div(下面的示例中爲綠色)的類別爲line如何對齊列中的行柔性元素?

#sentinels { 
    display: flex; 
    flex-direction: column; 
    justify-content: space-around; 
} 
.line { 
    display: flex; 
    flex-direction: row; 
    justify-content: space-around; 
} 

這給

enter image description here

我想,但是,有在列排列的div

enter image description here

就是這樣一個可以與設置flex

+0

是否有可能更新html代碼? –

+0

@MostafaBaezid:是的,但是行數不知道 – WoJ

+0

僅用於測試運行。像你的圖片 –

回答