定位的特殊特性(HTML、CSS)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>定位的特殊特性</title>
<style>
span {
position: absolute;
top: 300px;
width: 200px;
height: 150px;
background-color: skyblue;
}
div {
/* position: absolute; */
background-color: green;
}
</style>
</head>
<body>
<span>1</span>
<div>a</div>
</body>
</html>