<div class="box">
    <div class="el1"></div>
    <div class="el2"></div>
</div>

  

.box {width:200px;height:500px;background:red;display:flex;flex-direction:column;}
.el1 {height:100px;background:green;}
.el2 {background:blue;flex:1}

  

上下两个div, 一个固定高度, 另一个铺满屏幕

 

相关文章:

  • 2022-01-02
  • 2021-11-13
  • 2022-12-23
  • 2021-11-08
  • 2021-11-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案