我正在尝试制作基于引导程序的图库。我用400px / 400px(其中4个),800px / 400px(只有一个)和400px / 800px(只有一个)保存图像。以下是它的假设: 但我的问题是为什么2列底部有空格? 这是我的代码: CSS
.nopadding {
padding: 0 !important;
margin: 0 !important;
}
HTML
<div class="container" style="margin-top: 30px; background-color: grey; ">
<div class="row" >
<div class="col-md-6">
<div class="row">
<div class="col-md-6 " style="padding: 5px !important;">
<img src="images/1.jpg" alt="" width="100%">
</div>
<div class="col-md-6 " style="padding: 5px !important;">
<img src="images/2.jpg" alt="" width="100%">
</div>
<div class="col-md-12 " style="padding: 5px !important;">
<img src="images/3.jpg" alt="" width="100%">
</div>
</div>
</div>
<div class="col-md-6">
<div class="row">
<div class="col-md-6 " style="padding: 5px !important;">
<img src="images/4.jpg" alt="" width="100%">
</div>
<div class="col-md-6 nopadding">
<div class="">
<div class="col-md-12 " style="padding: 5px !important;">
<img src="images/5.jpg" alt="" width="100%">
</div>
<div class="col-md-12 " style="padding: 5px !important;">
<img src="images/6.jpg" alt="" width="100%">
</div>
</div>
</div>
</div>
</div>
</div>
</div>