我用css-flex創建了兩列。現在一欄的內容比另一欄多了很多。當我向下滾動時,這在左邊創造了許多空白空間。我想向下滾動,當到達較短列的末尾時,它應該& quot棍子& quot向下滾動較長的一欄。
<div class="item-wrapper">
<div class="item"></div>
<div class="item"></div>
</div>
.item-wrapper {
display: flex; flex-direction: row; justify-content: space-between; align-items: flex-start;
}
.item {
width: 47.5%;
}
.item:first-child {
background-color: red;
height: 120vh;
}
.item:last-child {
background-color: blue;
height: 300vh;
}
例如:https://codepen.io/yabaikumo/pen/gOQrYbx