我学习了flexbox,我有一个第一个问题,如何在图片中进行这样的列布局? [
MyCodeFiddle ](
http://jsfiddle.net/1s3bo913/ )
答案 0 :(得分:0)
您可以嵌套弹性箱容器:
display: flex; flex-direction: column;
display: flex; flex-direction: row;
display: flex; flex-direction: column;
并包含两个DIV或图像(浆果图片)答案 1 :(得分:0)
您可以为2个垂直column
es创建.small-box
,并在父级上设置flex: wrap
。我调整了宽度,使其与父元素尺寸匹配。
.flex-container {
display: flex;
width: 500px;
height: 400px;
flex-wrap: wrap;
}
.flex-container, .flex-col {
display: flex;
}
.flex-col {
flex-direction: column;
}
.large-box {
width: 300px;
height: 200px;
background: blue;
}
.small-box {
width: 200px;
height: 100px;
background: yellow;
}
.medium-box {
width: 250px;
height: 200px;
background: red;
}

<div class="flex-container">
<div class="large-box">
</div>
<div class="flex-col">
<div class="small-box">
</div>
<div class="small-box">
</div>
</div>
<div class="medium-box">
</div>
<div class="medium-box">
</div>
</div>
&#13;