# 如何实现左右固定,中间自适应布局

Issue

欢迎在 Issue 中交流与讨论: Issue 308 (opens new window)

可以参考 【Q017】css 如何实现左侧固定300px,右侧自适应的布局 (opens new window)

.container
  .left
  .main
  .right
.container {
  display: flex;
}

.left {
  flex-basis: 300px;
  flex-shrink: 0;
}

.right {
  flex-basis: 300px;
  flex-shrink: 0;
}

.main {
  flex-grow: 1;
}
Last Updated: 1/17/2021, 2:02:56 PM