<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{
margin: 0;
padding: 0;
}
.div1{
position: relative;
border: 10px solid yellow;
}
.div2{
width: 100px;
height: 100px;
background: red;
position: absolute;
}
</style>
</head>
<body>
<div class="div1">
<div class="div2"></div>
</div>
</body>
</html>
为什么呢?