实现高度自适应并且上下居中

<div id="wrap">
    <div class="box">DemoSeat</div>
</div>
<style>
#wrap {
    position: fiexd;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    .box {
        veralign: middle;
        width: 500px;
        margin: 0 auto;
        &:before {
            content: '';
            display: inline-block;
            width: 0;
            height: 100%;
            veralign: middle;
        }
    }
}
</style>

相关文章:

  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
  • 2021-07-17
  • 2021-05-25
猜你喜欢
  • 2022-12-23
  • 2021-10-23
  • 2021-12-04
  • 2021-11-30
  • 2021-10-19
  • 2022-12-23
  • 2021-07-11
相关资源
相似解决方案