Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.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_Margin_Footer - Fatal编程技术网

Html 与其他内容分开的页脚

Html 与其他内容分开的页脚,html,css,margin,footer,Html,Css,Margin,Footer,所以我并没有在页脚前的部分设置边线,但不知为什么它是分开的,我似乎无法找到原因。有什么想法吗?谢谢 html: )) 在进行任何样式设置之前,请尝试应用CSS重置:在HTML4规范()中,有一个默认的样式表定义页边距和其他格式。这可能会导致浏览器渲染边距,即使您没有在CSS中编写边距 据我所知,HTML5中还没有默认样式表的规范,因此浏览器使用自己的默认样式表 因此,section元素使用的边距似乎在默认情况下(在浏览器中)设置了一些边距。避免这种情况的最好方法是重置CSS 这可能是一个很好的解

所以我并没有在页脚前的部分设置边线,但不知为什么它是分开的,我似乎无法找到原因。有什么想法吗?谢谢

html:

))


在进行任何样式设置之前,请尝试应用CSS重置:

在HTML4规范()中,有一个默认的样式表定义页边距和其他格式。这可能会导致浏览器渲染边距,即使您没有在CSS中编写边距

据我所知,HTML5中还没有默认样式表的规范,因此浏览器使用自己的默认样式表

因此,
section
元素使用的边距似乎在默认情况下(在浏览器中)设置了一些边距。避免这种情况的最好方法是重置CSS


这可能是一个很好的解决方案。

您能给我们举个例子吗?
<section>
<div class="content"></div>
</section>

<footer>
<div id="footer"></div>
</footer>
.content{
 background-image: linear-gradient(bottom, rgb(135,127,127) 0%, rgb(37,37,35) 69%);
 background-image: -o-linear-gradient(bottom, rgb(135,127,127) 0%, rgb(37,37,35) 69%);
 background-image: -moz-linear-gradient(bottom, rgb(135,127,127) 0%, rgb(37,37,35)        69%);
 background-image: -webkit-linear-gradient(bottom, rgb(135,127,127) 0%, rgb(37,37,35) 69%);
 background-image: -ms-linear-gradient(bottom, rgb(135,127,127) 0%, rgb(37,37,35) 69%);

 background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0, rgb(135,127,127)),
color-stop(0.69, rgb(37,37,35))
 #footer{
  background:url(images/footer.png) left top no-repeat;
  height:450px;
   }