Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/85.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.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 twitter bootstrap 3.3中的整页静态页脚_Html_Css_Twitter Bootstrap 3 - Fatal编程技术网

Html twitter bootstrap 3.3中的整页静态页脚

Html twitter bootstrap 3.3中的整页静态页脚,html,css,twitter-bootstrap-3,Html,Css,Twitter Bootstrap 3,我试图在twitter引导程序中创建一个完整的静态页脚,就像在网站中或在网站中一样。这两个网站的页脚几乎都是400px到500px,我想要相同的页脚,但是静态的不固定,我创建的页脚显示为固定的,我不知道我在哪里弄乱了代码。这是我尝试的JSFIDLE,下面是我的代码 页脚html代码 <div class="footer affix clearfix"> gfh </div> 您需要将HTML和CSS更新为: <div class="footer">gfh&l

我试图在twitter引导程序中创建一个完整的静态页脚,就像在网站中或在网站中一样。这两个网站的页脚几乎都是400px到500px,我想要相同的页脚,但是静态的不固定,我创建的页脚显示为固定的,我不知道我在哪里弄乱了代码。这是我尝试的JSFIDLE,下面是我的代码

页脚html代码

<div class="footer affix clearfix">
gfh
</div>

您需要将HTML和CSS更新为:

<div class="footer">gfh</div>

.footer {
    height: 400px;
    width: 100%;
    background: #222222;
}
这是一把小提琴:

你不需要粘贴,除非你想它是固定的位置。此外,除非您计划在内部浮动元素,否则不需要clearfix。由于您计划使用默认的“静态”位置,因此不需要底部、左侧或右侧定位

我希望这有帮助。祝你好运

<div class="footer">gfh</div>

.footer {
    height: 400px;
    width: 100%;
    background: #222222;
}