Chrome中的以下代码会导致文本与第二个div
的顶部重叠。在FF它看起来不错。它真的是一个错误,或者我只是不理解一些基础知识?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
</head>
<body style="width:400px;">
<div style="float:right; width:100px; height:45px; background-color:gray;">
</div>
<div style="clear:right; float:right; width:200px; height:45px; background-color:blue;" >
</div>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</body>
</html>