div{
width:100px;
height:100px;
position:absolute;
top:0;
right:0;
bottom:0;
left:0;
margin:auto;
}
父级控制子级居中
.parent{
dsiplay:flex;
justify-content:center;
align-items:center;
}
div{
width:100px;
height:100px;
position:absolute;
top:0;
right:0;
bottom:0;
left:0;
margin:auto;
}
父级控制子级居中
.parent{
dsiplay:flex;
justify-content:center;
align-items:center;
}
本文标题:水平垂直居中
本文链接:https://www.haomeiwen.com/subject/ehrsyrtx.html
网友评论