DIV水平垂直居中
div {
width: 100px;
height: 100px;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
}
父级控制子集居中(弹性布局)
.parent {
display: flex;
justify-content: center;
align-items: center;
}
DIV水平垂直居中
div {
width: 100px;
height: 100px;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
}
父级控制子集居中(弹性布局)
.parent {
display: flex;
justify-content: center;
align-items: center;
}