Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.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
如何在HTML5中删除粘性页脚下方的空间?_Html_Css_Twitter Bootstrap - Fatal编程技术网

如何在HTML5中删除粘性页脚下方的空间?

如何在HTML5中删除粘性页脚下方的空间?,html,css,twitter-bootstrap,Html,Css,Twitter Bootstrap,我正在为响应性网站工作,并使用twitter引导。我无法修复网站中的页脚。谷歌搜索了许多网站,找到了解决方案,但它并不适用于我的特定页面。无法追踪问题。请检查一下电话号码。我不想在页脚下留任何空间。谢谢你 //css html, body { height: 100%; margin: 0pt; } #wrap { min-height: 100%; height: auto; margin: 0 auto -60px; padding:

我正在为响应性网站工作,并使用twitter引导。我无法修复网站中的页脚。谷歌搜索了许多网站,找到了解决方案,但它并不适用于我的特定页面。无法追踪问题。请检查一下电话号码。我不想在页脚下留任何空间。谢谢你

//css
html, body {
    height: 100%;
            margin: 0pt;
}

#wrap {
  min-height: 100%;
  height: auto; 
  margin: 0 auto -60px;  
  padding: 0 0 60px;
}


#footer {
  height: 60px;
  background-color: #f5f5f5;
}

也许这可以解决您的问题:

    #wrap {
  min-height: 100%;
  height: auto; 
  margin: 0 auto;  
  padding: 0;
}

这个空间是存在的,因为你有-60px的余量


margin:0自动-60px

这就是您要查找的内容:

您的HTML结构不正确

页脚div必须位于换行符之外

HTML

<div id="wrap">

    <div class="container-fluid" style="padding-top:1%; padding-bottom: 1%;">
        <div class="row-fluid">
            <div class="span12 largecircle">

            </div>      
        </div>
    </div>


</div>

<div id="footer">      
    <div class="container-fluid"   style=" background-color:#cccccc; position: absolute;  opacity:0.7;">
        <div class="row-fluid">
            <h1>Sticky </h1>
        </div>
        <p class="lead">Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS.</p>       
        <p>Use  if need be, too.</p>
    </div>
</div>

粘性的

使用此自定义HTML和CSS将固定高度的页脚固定到桌面浏览器的视口底部。

如果需要也可以使用


它是,反作用
填充:0 60px…将div拉伸到整个空间是常见的想法!!:)底部空间仍然没有变化。您可以尝试使用
#wrap{position:absolute;bottom:0;left:0;width:100%;}
@RaduVulcu:仍然存在空间。你检查过JSFIDLE链接了吗?对不起。还是没有变化。我试过这样的样品。测试了twitter引导示例页面。它们都工作正常,但在我的页面中不工作。将“页边距:0pt;”替换为“页边距:0;”感谢您提供的解决方案。在jsfiddle中,它工作得很好,但我需要将页脚放入包装中。可能吗?为什么页脚需要在包装内?这应该没什么区别。