float浮动
#id1 {
width: 100px;
height: 100px;
background-color: red;
/*浮动 常用3种 left,right,none*/
float: left;
}
#id2 {
width: 100px;
height: 100px;
background-color: green;
float: left;
}
#id3 {
width: 100px;
height: 100px;
background-color: blue;
float: right;
}
#text {
/*清除浮动设置,相邻浮动的标签默认浮动属性,需要时清除*/
clear: both;
}
#id {
width: 250px;
height: 700px;
background-color: gray;
}