在div的外面添加父级div并设置 padding-bottom: 10px;!
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
        .clear {
            zoom: 1;
            /*iE 6;*/
        }
        .clear:after {
            content: "";
            display: block;
            clear: both;
        }
        .wrap {
            padding-bottom: 10px;
        }
        #div1 {
            width: 100px;
            height: 100px;
            background: red;
            float: left;
        }
        #div2 {
            width: 200px;
            height: 100px;
            background: yellow;
        }
    </style>
</head>
<body>
<div class="wrap clear">
    <div id="div1"></div>
</div>
<div id="div2"></div>
</body>
</html>
    Me discréditer résister, peut supporter beaucoup de compliments!
 
                     
                    
                 
                    
                 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号