2017-10-20 79 views

回答

-1

使身體你的頁面的100%,以100%的最小高度了。

頁腳然後給出負的margin-top:

#footer { 
    clear: both; 
    position: relative; 
    z-index: 10; 
    height: 3em; 
    margin-top: -3em; 
} 

如說jon-winstanley

+0

@jusTTaLRex,複製這個答案這個SO https://stackoverflow.com/questions/643879/css- to-make-html-page-footer-stay-at-the-page-with-a-minimum-height請提一下 – core114

+0

我的內容是動態的。所以它不適用於動態內容。 –