css - 在页面底部放置一个 div 并将内容保留在上方

标签 css

我有以下 CSS,它在页面底部放置一个 div。

问:如何阻止内容在其下方流动?

#footer {
    position:fixed;
    bottom:0;
    background:url(../images/bg-footer.jpg) top;
    z-index:200;
    height:34px;
    width:100%;
    line-height:34px;
    padding:0;
    font-size:11px;
    color:#fff;
}

我无法向正文或任何内容添加填充,因为我按照本教程设置了全屏背景图像:

http://css-tricks.com/how-to-resizeable-background-image/

最佳答案

试试 sticky footer

关于css - 在页面底部放置一个 div 并将内容保留在上方,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2530097/

相关文章:

CSS 最小高度不起作用

html - 如何让相邻和不相邻的方 block 的边界都相等?

javascript - 网页包;如何动态导入css

javascript - Jquery 打开关闭 div 缺少一些东西

html - 在下面的 CSS 布局中,如何使箭头右对齐?

css - float 图像中断悬停

html - css 中透明的背景色无法提供适当的分层布局

html - 如何将 index.html 与 github 上的其他 .html 文件放在同一个文件夹中?

html - ie7 中的悬停问题

css - 为什么我的 flex-box 元素 "float"在我将它们的元素设置为彼此堆叠( block )时彼此相邻?