再次垂直水平居中 - flex+margin
by redky
HTML
<div class="box">
<div class="s">hello</div>
</div>
CSS
.box {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: flex;
}
.s {
margin: auto;
}
by redky
<div class="box">
<div class="s">hello</div>
</div>
.box {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: flex;
}
.s {
margin: auto;
}