答案 0 :(得分:3)
添加清除
.image-block
{
height:300px;
background-color:black;
clear:both;
}
答案 1 :(得分:0)
通过查看您给出的示例,黑框div位于彩色框div的div之外,例如:
<div class="main-container">
<div class="colors">
<div class="col1 float-left"></div>
<div class="col2 float-left"></div>
<div class="col3 float left"></div>
</div>
<div class="black-box"></div>
</div>
<style>
.float-left { float: left; }
.col1 { background-color: red; }
.col2 { background-color: blue; }
.col3 { background-color: green; }
.black-box { background-color: black; }
</style>
...不要忘记为尺寸等添加CSS。我刚给你骨架......