<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="./dsmd.css">
<title>Document</title>
</head>
<body>
<div class="box" id="one">One</div>
<div class="box" id="two">Two</div>
<div class="box" id="three">Three</div>
<div class="box" id="four">Four</div>
</body>
</html>
dsmd.css
.box {
display: inline-block;
100px;
height: 100px;
background: red;
color: white;
}
#two {
position: absolute;//探究position中static、absolute、relative、fixed、sticky的区别
top: 20px;
left: 20px;
background: blue;
}