我想创建一个列布局,其中第一列收缩高度以适合其内容,其余列用<div id="wrapper">
<div id="firstcolumn">...variable height content...</div>
<div id="column">...variable height content locked to height of above...</div>
<div id="column">...variable height content locked to height of above...</div>
</div>
“锁定”到该高度,这样如果内容太多,它将创建一个滚动条。
这是我到目前为止所做的,但显然不起作用:
HTML:
#wrapper {
display: flex;
/*height: 300px; <--This solves the issue, but I don't want a fixed height*/
}
#column {
overflow-y: auto;
}
CSS:
{{1}}