div{
color: red;
background-color: blue;
}
#home{
height: 200px;
width: 200px;
background-color: yellow;
border: 20px solid red;
padding: 50px;
margin: 50px;
}
#ab{
height: 100px;
width: 100px;
background-color: white;
}
#about{
height: 150px;
width: 100px;
background-color: purple;
}
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<title>AboutMe</title>
</head>
<body>
<div>
<div id="home"><div id="ab"></div></div>
<div id="about">about</div>
</div>
</body>
</html>
黄色部分的css属性设置,以下四个属性从内到外构成一个完整的盒模型
content:白色框
padding:白框外边到黄框里边,内边界
border:红色
margin: 蓝色框