【发布时间】:2017-07-13 08:13:37
【问题描述】:
我有 4 个高度不同的 div,但所有四个都有向左浮动选项。这里的问题是,第一个 div 的高度比第二个 div 低,而第三个 div 在第二行,它在第一和第二之间有空间。
.hyper {
float: left;
border: 1px solid #CCC;
text-align: center;
}
<div class="preview">
<div class="hyper" style="height:97.76666px;width:29.90%">0</div>
<div class="hyper" style="height:183.76666pxwidth:69.96%">1</div>
<div class="hyper" style="height:97.76666px;width:29.90%">2</div>
<div class="hyper" style="height:97.76666px;width:69.96%">3</div></div>
【问题讨论】:
-
出现错误:
<div class="hyper" style="height:183.76666pxwidth:69.96%">1</div>改成<div class="hyper" style="height:183.76666px;width:69.96%">1</div>