浮动与clear测试

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>浮动</title>
    </head>
    <body>
        <div style="width: 200px; height: 200px; background-color: red; float: left;"></div>
        <div style="width: 200px; height: 200px; background-color: blue; float: left;"></div>
        <div style="width: 200px; height: 200px; background-color: yellow; float: left;"></div>
        <div style="clear: left; width: 500px; height: 500px; background-color: black;"></div>
        <div style="width: 200px; height: 200px; background-color: gold; float: left;"></div>
        <div style="width: 200px; height: 200px; background-color: green; float: left;"></div>
    </body>
</html>

 

posted @ 2020-04-05 10:51  yxfyg  阅读(129)  评论(0)    收藏  举报