复习浮动
浮动
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
开发工具与关键技术: dw 常识
作者: 熊 强
撰写时间:2019/02/05
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
复习一些刚开始学的浮动
首先我们简单设置一个盒子
.fd{
width: 200px;
height: 200px;
background: red;
margin: auto;
}
得到的效果是这样的
在中间
.fd{
width: 200px;
height: 200px;
background: red;
margin: auto;
float: right;
}
右浮动
.fd{
width: 200px;
height: 200px;
background: red;
margin: auto;
float: left;
}
这是左浮动
好了完成