2017-10-20 83 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

我的内容是动态的。所以它不适用于动态内容。 –