0

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>
4

0 回答 0