<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
/* 声明清除浮动的样式 */
.clearfix:after {
content: "";
display: block;
height: 0;
visibility: hidden;
clear: both;
}
/* ie6 7 专门清除浮动的样式*/
.clearfix {
*zoom:1;
}
.one {
500px;
border: 1px solid red;
}
.damao {
float: left;
200px;
height: 200px;
background-color: purple;
}
.ermao {
float: left;
250px;
height: 250px;
background-color: skyblue;
}
.two {
700px;
height: 150px;
background-color: #000;
}
</style>
</head>
<body>
<div class="one clearfix">
<div class="damao"></div>
<div class="ermao"></div>
</div>
<div class="two"></div>
</body>
</html>