html - 页脚隐藏内容

标签 html css footer

我有以下页脚,似乎工作正常,但存在问题,当我向下滚动页面时,页脚覆盖了内容。有人有什么建议吗?提前致谢。

HTML:

<div class="footer" id="footer">My footer</div>

CSS:

#footer {

    border: 1px groove #aaaaaa;
    background: #333333;
    color: white;
    padding: 0;
    text-align: center;
    vertical-align: middle;
    line-height: normal;
    margin: 0;
    position: fixed;
    bottom: 0px;
    width: 100%;
    height:40px;

}

最佳答案

试试正文 padding-bottom:40px;

body{
  padding-bottom:40px;
}

关于html - 页脚隐藏内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41587600/

相关文章:

html - 将父 div 相对的 div 居中

javascript - 按 ENTER 键时表单未发布到服务器

javascript - 如何使用 PHP 和 MySQL 创建多个 javascript 模式框?

jquery - 页脚重叠

android - 为移动响应站点对齐 DIV 中的 2 个按钮

html - 如何设置几个表格水平? Bootstrap

asp.net - 将验证控件与文本框对齐

html - 页脚随屏幕变大而移动

html - 我们网站的 CSS 内容区域在不应该滚动的时候滚动

javascript - 列表中的特定元素与其他元素的格式不同