页脚隐藏内容

时间:2017-01-11 09:54:07

标签: 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;

}

1 个答案:

答案 0 :(得分:0)

尝试正文padding-bottom:40px;

body{
  padding-bottom:40px;
}