float之clear(清除)

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>float</title>
<style>
        .outer{
background-color:blue;
}
.me1{
100px;
height: 50px;
color:gold;
float:left;
}
.me2{
100px;
height: 50px;
color:gold;
float:left;
}
.bottom{
text-align: center;
background-color: #c39;
}
.clear{
clear: both;
}
使空标签占一整行
</style>
</head>
<body>
<div class="outer">
<div class="me1">menu1</div>
<div class="me2">menu2</div>
<div class="clear"></div>

</div>

<div class="bottom">bottom</div>


</body>
</html>


原文地址:https://www.cnblogs.com/startl/p/12173319.html