【发布时间】:2019-03-03 12:32:33
【问题描述】:
我正在使用带有 Angular6 的 FlexLayoutModule 并尝试在垂直方向上实现两个 50% 高度的 div。我已经尝试过这个特定的代码,但两者都没有占据父级的 50% 高度。
<div style="min-height:50px">I'm header</div>
<div style="height:100%">
<div fxLayout="column" fxLayoutGap="12px">
<div fxFlex="50%" style="background:#5896FF">
<h1>I should occupy 50% height of my parent</h1>
</div>
<div fxFlex="50%" style="background:#525252">
<h1>I should occupy 50% height of my parent</h1>
</div>
</div>
【问题讨论】:
标签: css angular flexbox angular6 angular-flex-layout