<html>
<head>
<style>
.vcenter {
position: relative;
height: 100%;
width:50px;
}
.vcenter-child {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
margin: auto;
display: table;
text-align: center;
}
</style>
</head>
<body>
<div class="vcenter">
        <div class="vcenter-child">vertical-centering, 我要垂直居中vertical-centering, 我要垂直居中</div>
    </div>
</body>
</html>

  

相关文章:

  • 2021-12-31
  • 2021-10-10
  • 2022-01-03
  • 2022-01-30
  • 2022-02-11
  • 2021-09-14
  • 2022-03-04
  • 2021-08-23
猜你喜欢
  • 2021-09-08
  • 2021-08-31
  • 2022-12-23
  • 2022-01-08
  • 2021-12-01
相关资源
相似解决方案