css 左右而已,左边根据自动伸展,右边填满剩余空间

<div class="container">
  <div class="left"></div>
  <div class="right"></div>
</div>
.container {
  display: flex;
}
.left {
  flex: 0 0 auto;
  height: 100px;
  background-color: red;
}
.right {
  flex: 1 1 auto;
  height: 100px;
  background-color: blue;
}

转自 https://www.bbsmax.com/A/gGdXLj6vd4/

posted on 2022-11-30 16:16  空明流光  阅读(148)  评论(0编辑  收藏  举报

导航