CSS中clear:both用法及事例

例如

<style>
.demodiv{float:left;100px;height:50px;background:red;margin:5px;}
.d{clear:both}
</style>
<div class="demodiv">1</div>
<div class="demodiv">2</div>
<div class="d"></div>
<div class="demodiv">3</div>
<div class="demodiv">4</div>

原文地址:https://www.cnblogs.com/amylis_chen/p/2232165.html