<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>s</title>
<style>
.center{
position: relative;
width: 400px;
height: 600px;
margin: 0 auto;
margin-top: 100px;
}
.box{
width: 100px;
height: 100px;
}
.box1 {
position: absolute;
left: 0;
bottom: 0;
background-color: pink;
}
.box2 {
position: absolute;
left: 100;
bottom: 0;
background-color: darkorchid;
}
.box3 {
position: absolute;
left: 200;
bottom: 0;
background-color: darkcyan;
}
.box4 {
position: absolute;
left: 300;
bottom: 0;
background-color: sandybrown;
}
<style>
</head>
<body>
<div class="center">
<div class="box1 box"></div>
<div class="box2 box"></div>
<div class="box3 box"></div>
<div class="box4 box"></div>
</div>
</body>
<html>
为什么重合了?