为什么html在body中的div设置margin会把float的div也下移,代码见问题详情

新手上路,请多包涵
<body>
<div></div>
<div style="width:400px; height: 500px; float: left;">left</div>
<div style="width:700px; height: 700px; float: right;">right</div>
<div style="height: 20px;margin-top: 50px;">clear</div>
</body>

<body>
<div style="width:400px; height: 500px; float: left;">left</div>
<div style="width:700px; height: 700px; float: right;">right</div>
<div style="height: 20px;margin-top: 50px;">clear</div>
</body>
阅读 3.7k
推荐问题