.outer {
width: 200px;
height: 200px;
background: red;
position: relative;
}
.inner {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50);
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
}
h5 上下左右前后居中
最新推荐文章于 2022-09-07 11:23:08 发布