我的页脚不会粘到底部

时间:2017-07-04 22:01:11

标签: html css

因此,我正在制作一个像我刚刚开始学习的网站,有点模拟,网页就不会停留在底部而且它会杀死我。当我加载页面时,它从底部开始,然后当我向下滚动时,它停留在同一个地方并且卡在它开始的位置,并且不会从页面底部开始。

#footer {
    text-align: right;
    padding: 10px;
    background-color: #07889B;
    position: absolute;
    bottom: 0;
    width: 1200px;

}

1 个答案:

答案 0 :(得分:1)

这应该有效

#footer {
    text-align: right;
    padding: 10px;
    background-color: #07889B;
    position: fixed;
    bottom: 0;
    left:0;
    width: 1200px;//or width:100%;
}