最佳答案
我需要在 #first
下用 #second
div 填充 #wrapper
的 剩余垂直空间剩余垂直空间。
我需要一个唯一的 CSS 解决方案。
#wrapper {
width: 300px;
height: 100%;
}
#first {
width: 300px;
height: 200px;
background-color: #F5DEB3;
}
#second {
width: 300px;
height: 100%;
background-color: #9ACD32;
}
<div id="wrapper">
<div id="first"></div>
<div id="second"></div>
</div>