Fork me on github

div自动撑满剩余高度

<div class="main">
   <div class="top"></div>
   <div class="bottom"></div>
</div>

 

  .main {
    width: 100%;
    height: 100%;
  }
  .top {
    height: 100px;
    background: pink;
  }
  .bottom {
    position: absolute;
    width: 100%;
    top: 100px;
    left: 0;
    bottom: 0;
    background: yellowgreen;
  }

转自:https://www.cnblogs.com/chxl800/p/13408755.html

posted @ 2022-01-07 12:37  我の前端日记  阅读(266)  评论(0编辑  收藏  举报
Copyright © 2021 LinCangHai
Powered by .NET 5.0 on Kubernetes