我有很难用简单的CSS片断为页脚文本。 页脚文本必须始终在页面画面结束后一切来。

结束
有帮助吗?

解决方案

* {
    margin: 0;
}
html, body {
    height: 100%;
}
.wrapper {
    min-height: 100%;
    height: auto !important;
    height: 100%;
    margin: 0 auto -142px; /* the bottom margin is the negative value of the footer's height */
}
.footer, .push {
    height: 142px; /* .push must be the same height as .footer */
}

/*

Sticky Footer by Ryan Fait
http://ryanfait.com/

*/

其他提示

有关工作的例子,你可以挑选除了我以前做过同样的事情为我们的客户:

下推网页 - 固定位置网页

使用bottom属性:

#footer
{
    position:absolute;
    bottom:2px;
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top