代码中的“容器1”为何不在“容器1的父容器”中???
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>布局模型之Layer Model</title>
<style type="text/css">
body{
background-color: #eee;
}
h4{
margin:4px auto;
}
#div1-father{
background-color: white;
border:1px solid blue;
width:200px;
height:200px;
}
#div1{
width:100px;
height:100px;
border:1px solid blue;
background-color: yellow;
/*图层布局*/
position:absolute;
top:20px;
right:100px;
}
</style>
</head>
<body>
<h4>图层布局模型 Layer Model</h4>
<div id="div1-father">
容器1的父容器
<div id="div1">
容器1
</div>
</div>
</body>
</html>