我试图使用Bootstrap和Flexbox创建一个库,其中有一个大图像,旁边是两个较小的堆叠图像,并且两者都是相同的高度。Boostrap和Flexbox的等高柱高
容器列似乎正在做他们的工作,并保持相同的高度,但我需要列中的img
填充容器的高度。
它适用于Firefox,如果我在img
上使用height: 100%
,但在Chrome和Safari中均可使用。
img {
max-width: 100%;
width: auto\9;
height: auto;
vertical-align: middle;
border: 0;
-ms-interpolation-mode: bicubic;
}
figure {
margin-bottom: 0;
}
.rts-col {
margin-bottom: 30px;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<div class="rts-col col-8">
<figure>
<img src="http://via.placeholder.com/1400x933">
</figure>
</div>
<div class="rts-col col-4">
<figure style="margin-bottom: 30px;">
<img src="http://via.placeholder.com/1400x933">
</figure>
<figure>
<img src="http://via.placeholder.com/1400x933">
</figure>
</div>
</div>
</div>
这里的标记和样式表:https://jsfiddle.net/tylorreimer/q8qe5p80/2/
@Paulie_D我没有意识到我可以将代码插入到我的问题上左右。我刚刚更新了我的问题,以包含最小代码标记。 – tylorreimer