//div中的内容垂直居中 display: table-cell; vertical-align: middle;
<div style="background: #f00; width: 100vh;height: 100vw; display: table-cell; vertical-align: middle;">
<div style="background: #00f; height: 80px; width: 50px;">垂直居中的块儿</div>
</div>
`
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交