Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 页脚不在底部_Html_Css - Fatal编程技术网

Html 页脚不在底部

Html 页脚不在底部,html,css,Html,Css,我的HTML代码 My CSS CODE footer { background-color: #242424; bottom: 0; clear: both; color: #727272; height: 210px; left: 0; line-height: 20px; position: absolute; width: 100%;

我的HTML代码

My CSS CODE

footer {
        background-color: #242424;
        bottom: 0;
        clear: both;
        color: #727272;
        height: 210px;
        left: 0;
        line-height: 20px;
        position: absolute;
        width: 100%;
        z-index: 1;
    }

这是我的


你可以看到中间的页脚栏。为什么我用了正确的CSS呢???如果有任何帮助,我们将不胜感激

使用
position:relative
在主体内容下显示页脚,或使用
position:fixed
将页脚粘贴在页面底部。

使用
position:relative
在主体内容下显示页脚,或使用
position:fixed
将页脚粘贴在页面底部。

使用position:relative位置:绝对位置

我看到你使用的最小高度:2000px。请使用它作为你的内容通过这一点

 <footer></footer>

使用位置:相对,而不是位置:绝对

我看到你使用的最小高度:2000px。请使用它作为你的内容通过这一点

 <footer></footer>
除去

 body {
        background-color: #FFFFFF;
        font-size: 14px;
        margin: 0 auto;
        min-height: 2000px;
        width: 980px;
    }
从车身上拆下

 body {
        background-color: #FFFFFF;
        font-size: 14px;
        margin: 0 auto;
        min-height: 2000px;
        width: 980px;
    }
从身体