您的位置:首页 > Web前端 > CSS

css浮动float的使用示例

2016-05-10 18:32 519 查看
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;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: