浮动特性
1.浮动元素会脱离标准(脱标)
2.浮动元素会一行内显示并且元素顶部
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style>
.a{
/*foat:浮动*/
/*float:left(左) right(右) none(没有浮动)*/
/*float:right; 右浮动*/
float:left;
width: 400px;
height: 400px;
background-color:peachpuff;
}
.a2{
/*float:left(左)*/
float:left;
width: 800px;
height: 800px;
background-color: green;
}
.a3{
/*float:right(右)*/
float:right;
width: 400px;
height: 400px;
background-color:hotpink;
}
</style>
</head>
<body>
<div class="a">1</div>
<div class="a2">2</div>
<div class="a3">3</div>
</body>
</html>