1 and a second menu for the menu background color recovery method (to its parent tag: overflow: hidden)

<! DOCTYPE HTML> 
<HTML lang = "EN">
<head>
<Meta charset = "UTF-. 8">
<title> a float </ title>
<style>
.outer {
background-Color: Blue;
overflow: hidden; / * do not add div, still add the background color can be achieved remains constant * /
}
.me1 {
width: 100px;
height: 50px;
color: Gold;
a float: left;
background-color: Purple;
}
.me2 {
width : 100px;
height: 50px;
Color: Gold;
a float: left;
background-Color: # 1ecc86;
}
.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>

Guess you like

Origin www.cnblogs.com/startl/p/12177916.html