html - 页脚文本的CSS

标签 html css footer

我很难为页脚文本制作一个简单的 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/

*/

关于html - 页脚文本的CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1565624/

相关文章:

javascript - 当selenium webdriver中输入类型不是 ' select'时如何从下拉列表中获取元素

html - 我的按钮和链接的悬停功能不起作用

css - 标记 HTML5 页脚内容的正确方法是什么?

html - 如何在 HTML 和 CSS 中创建固定页脚

html - 如何删除正文和页脚之间的空白间隙?

javascript 文本解释为脚本

android - 将 String 设置为 Edittext 时\n(新行)的两种方式数据绑定(bind)问题

html - 使用 CSS 将文本居中,在空白区域填充分隔线

Firefox 的 userChrome.css 中的 CSS 变量不生效

Windows 更新破坏了多部分/表单数据(更新 : KB3104002 )