【发布时间】:2017-07-04 02:20:59
【问题描述】:
我有以下布局:
.content-container {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.view-content {
width: 100%;
display: flex;
justify-content: space-around;
}
.zavod,
.ekipa {
width: 100%;
max-width: 300px;
background-color: red;
}
<div class="content-container">
<div class="view-content">
<section class="zavod">
<p>Some text</p>
</section>
<section class="ekipa">
<p>Some more text</p>
<p>Even more text</p>
<p>Even more text</p>
</section>
</div>
</div>
我想要完成的是.zavod 和.ekipa 具有不同的高度。现在这可以在单个 flex 容器中使用,但是当我嵌套多个容器时它不起作用。
我做错了什么?
【问题讨论】: