<分区>
我有一个 flex 容器,它有两个固定尺寸的子容器,它们对齐 flex-end(父容器的底部)。
当我调整父级大小时,我希望它们相互重叠,但它们各自占据了父级高度的 50%。
有没有办法在不添加另一个 div 的情况下做到这一点?
.wrapper {
width: 600px;
height: 500px;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: flex-end;
background-color: #eeeeee;
resize: horizontal;
overflow: auto;
flex-wrap: wrap;
}
.one {
width: 200px;
height: 100px;
background: red;
}
.two {
width: 200px;
height: 100px;
background: blue;
}
<div class="wrapper">
<div class="one">1</div>
<div class="two">2</div>
</div>