0. **Flexbox 实现**:
```
css复制代码.container {
display: flex;
}
.fixed {
width: 200px; /* 两边固定宽度 */
}
.flexible {
flex: 1; /* 中间自适应 */
}
```
```
html复制代码<div class="container">
<div class="fixed">Left</div>
<div class="flexible">Center</div>
<div class="fixed">Right</div>
</div>
```
0. **Grid 实现**:
```
css复制代码.container {
display: grid;
grid-template-columns: 200px 1fr 200px; /* 两边固定宽度,中间自适应 */
}
```
```
html复制代码<div class="container">
<div class="fixed">Left</div>
<div class="flexible">Center</div>
<div class="fixed">Right</div>
</div>
```