<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>嵌套div</title>
<style type="text/css">
#div1{
width: 408px;
/* 可以省略 由下级撑开 */
/* height: 408px; */
margin-top: 100px ;
margin-left: 100px;
border: 1px black dashed;
}
#div2{
/* 继承父级 */
/* width: 345px;
height: 345px; */
margin: 28px;
border: 5px skyblue solid;
}
#div3{
/* width: 300px;
height: 300px; */
margin: 23px;
background-color: deeppink;
overflow: hidden;
}
#div4{
/* width: 220px;
height: 220px; */
margin: 40px;
border: 1px white dashed;
}
#div5{
/* width: 210px;
height: 210px; */
margin: 4px;
border: 1px white dashed;
}
#div6{
/* width: 105px; */
height: 105px;
margin: 50px;
border: 5px yellow solid;
background-color: #7CFC00;
}
</style>
</head>
<body>
<div id="div1">
<div id="div2">
<div id="div3">
<div id="div4">
<div id="div5">
<div id="div6">
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
showtime: