首页 > 试题广场 >

需要实现一个左侧宽度固定,右侧元素自适应,应该在下面代码中补

[单选题]
需要实现一个左侧宽度固定,右侧元素自适应,应该在下面代码中补充哪个选项()
<div class="container">
<div class="fixed-width">固定宽度</div>
<div class="flexible-width">自适应宽度</div>
</div>
.container {
display: flex;
}
.fixed-width {
width: 200px; /* 左边元素的固定宽度 */
}
.flexible-width {
/* 在此补全代码 */
}
  • flex-direction: row
  • flex-wrap: nowrap
  • align-items: flex-end
  • flex: 1
为什么不是D呀
发表于 2024-09-12 23:17:25 回复(2)