【发布时间】:2015-08-19 04:48:37
【问题描述】:
看起来不错,除了在垂直平板电脑浏览器上。由黑色 div 的高度强制显示红色和蓝色 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>
【问题讨论】:
-
您期待什么?每行都以
结尾,因此 div 会随着每行添加而向下移动。
标签: html css twitter-bootstrap height