有在我的網站,該網站的內容少一些網頁,如何在頁面底部製作頁腳?
the content height + footer height < one screen height
見下圖:
所以我的問題是如何讓頁腳處的底部當我的內容的高度不足以覆蓋整個頁面時,哪些頁面?
PS:我不想將頁腳頁面固定在底部。
有在我的網站,該網站的內容少一些網頁,如何在頁面底部製作頁腳?
the content height + footer height < one screen height
見下圖:
所以我的問題是如何讓頁腳處的底部當我的內容的高度不足以覆蓋整個頁面時,哪些頁面?
PS:我不想將頁腳頁面固定在底部。
<div class="wrapper">
<div>content here, this will push the footer down the page if it is needed</div>
<footer>footer here</footer>
</div>
html, body {
height:100%;
min-height:100%;
}
.wrapper {
position:relative;
min-height:100%;
}
footer {
position:absolute;
bottom:0px;
width:100%;
background-color:red;
}
http://css-tricks.com/snippets/css/cross-browser-min-height/ –
向我們展示你的CSS的頁腳元素 –
如果您不希望您的頁腳被修復,然後將最小高度應用到您的內容中 –
@ C-Link能否解釋它更詳細LED? – Charles0429