.row2是粘在窗口底部的固定高度頁腳。我想讓.row1佔據窗口中的所有剩餘高度,使其內部的圖像可以像.row1高度一樣大。使行佔用高度上的剩餘空間
即使使用flexbox,我也無法弄清楚如何做到這一點。
簡體HTML結構我是:
<div class="wrapper">
<div class="row1">This row takes up remaining space in height, image should scale up to touch footer
<br />
<img src="http://www.placehold.it/200x200" />
</div>
<div class="row2">Fixed height footer always stuck to bottom of window</div>
</div>
的jsfiddle如下: http://jsfiddle.net/1swdf6eh/5/
juwt add width 100%; http://jsfiddle.net/1swdf6eh/6/ –