除了垂直平板电脑浏览器外,看起来不错。红色和蓝色div之间的空白出现,被黑色div的高度所强制。如何消除不同class = row(Bootstrap)中两个div之间的空格?
在解决方案中,平板电脑/手机屏幕上div的堆叠顺序变为蓝色>黑色>红色也很关键。
<html>
<div class="container">
<div class="row">
<div class="col-sm-7"><div class="blue"><img src="jpg"> Lots of whitespace appears below between 768 to aprx 900 px browser width (tablet dimenions)</div></div>
<div class="col-sm-5"><div class="black">Line of text<br>Line of text<br>Line of text<br>Line of text<br>Line of text<br>Line of text<br>Line of text<br>Line of text<br>Line of text<br>Line of text<br>Line of text<br>Line of text<br>Line of text<br>Line of text<br>Line of text<br>Line of text<br>Line of text<br>Line of text<br>Line of text</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-sm-7"><div class="red">Red</div></div>
<div class="col-sm-5"><div>
</div>
</div>
</html>
https://jsfiddle.net/g7xg0uc7/1/
你期望什么?每行以
结尾,因此div将随着每行添加而向下移动。 – Grumpy