我想知道如何獲得與圖片中相同的效果。我嘗試過很多方式......不成功。Flexbox - 如何更改列的順序?
我試圖設置一個有四列的flexbox,其中左列的大小相同。中間一列填充剩餘的空間。
我想要得到的效果,
的代碼如下:
.container {
display: flex;
}
.sidebar {
display: flex;
flex-direction: column;
}
.box-a {
background: yellow;
height: 200px;
width: 200px;
margin: 10px;
}
.box-b {
background: yellow;
height: 200px;
width: 200px;
margin: 10px;
}
.box-c {
background: yellow;
height: 200px;
width: 200px;
margin: 10px;
}
.box-d {
background: green;
height: 800px;
width: 600px;
margin: 10px;
}
<div class="container">
<div class="sidebar">
<div class="box-a"></div>
<div class="box-b"></div>
<div class="box-c"></div>
</div>
<div class="box-d"></div>
</div>
代碼的問題必須直接張貼作爲一個答案 –