css当中的外边距
小于 1 分钟
<!DOCTYPE html>
<html>
<head>
<title>css属性当中的外边距:margin</title>
<meta charset="utf-8" />
<link href="" type="text/css" rel="stylesheet" />
<style>
div{
width:300px;
height:300px;
float:left;
border:1px solid red;
/*margin-right:10px;
margin-bottom:10px;*/
}
#one{
/*设置外边距:四个边都生效*/
/*margin:10px;*/
/*单独设置每一个边的外边距*/
/*margin-left:10px;
margin-top:20px;
margin-right:30px;
margin-bottom:40px;*/
/*设置上下、左右的外边距*/
margin:10px 20px;
/*设置上、右、下、左的外边距*/
margin:10px 20px 30px 40px;
}
#two{
}
</style>
</head>
<body>
<h1>css属性当中的外边距:margin</h1>
<div id="one"></div>
<div id="two"></div>
</body>
</html>