页面顶部的多余空白 [英] Extra white space at the top of my page

查看:38
本文介绍了页面顶部的多余空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个网站上工作,我只是注意到页面顶部和底部有这个无法解释的空白.我搜索了一些帖子,他们告诉我确保使用没有BOM的UTF-8编码,并且尝试了这一点,这没有什么区别.如果有人愿意看的话,网址是网址

I'm working on a website and I just noticed there there is this unexplained white space at the top and bottom of my page. I search through some post and they told me to make sure I used UTF-8 encoding without BOM and I tried that and it made no difference. If anyone would be willing to look at it the url is url

推荐答案

< h1> 元素上的默认间距(边距)导致顶部间距.将此添加到您的CSS中.

The default spacing (margin) on the <h1> element is causing the top spacing. Add this in your css.

h1 { margin-top: 0; }

这篇关于页面顶部的多余空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆