2
我試圖讓一個粘性的頁腳工作,但我的問題是我需要嵌套的div #container一直擴展到頁腳。我嘗試了各種方法,但無法取得任何進展。粘性頁腳與嵌套div推內容
當內容短時,頁腳應該粘到底部。
<body>
<div id="wrapper">
<div id="header">click here to reset</div>
<div id="banner-region">click here to add content</div>
<div id="navigation"></div>
<div id="content">
<div id="container">
<p>This div should extend all the way down to the bottom and touch the footer</p>
</div>
</div>
</div>
<div id="footer"></div>
</body>
小提琴: http://jsfiddle.net/Vu2uP/3/
可能是'Flexbox的情況下'。 – CBroe
「粘腳」是什麼意思?你是否希望頁腳始終可見,並將內容滾動到後面? – jonsuh
@jonsuh不,對不起。我的意思是,頁腳始終位於頁面的底部,即使背景爲短內容 – jmorc