📅  最后修改于: 2022-03-11 14:47:43.797000             🧑  作者: Mango
.parent-div {
position: relative;
width: 100px;
height: 100px;
background: #ffffff;
border: 1px solid #000000;
}
.div:before {
content: "";
width: 20px;
height: 20px;
background: blue;
position: absolute;
top: 45%;
left: 45%;
}