简体   繁体   English

CSS删除HTML页面的顶部灰色行

[英]CSS to Remove Top Grey line of a HTML page

I am trying to develop a webpage where I would like to remove the space on the top of my page so that the content will start just when the page starts, without any gap. 我正在尝试开发一个网页,我想在该网页上删除页面顶部的空间,以便内容在页面开始时就开始显示,而没有任何间隙。 Just like below. 就像下面一样。

在此处输入图片说明

But when I try to do the same for my page, I see a grey line on the top of my page and I am not able to remove that. 但是,当我尝试对页面执行相同操作时,页面顶部会出现一条灰线,因此无法删除。

在此处输入图片说明

As you can see my red banner has a gap on top of it, unlike the previous picture. 如您所见,与上一张图片不同,我的红色横幅上面有一个缝隙。 The CSS I am using is: 我正在使用的CSS是:

body {
    font-family: Arial;
    font-size: 11.5px;
    color:#4C464D;
    margin:0;
    padding:0;
    border:0;
    outline:0;
    vertical-align: baseline; 
}

--To my surprise, there is absolutely nothing in the page, but I still see the line. -令我惊讶的是,页面上绝对没有任何内容,但我仍然看到了这一行。

The code I kept very basic. 我保留的代码非常基础。

<!DOCTYPE html>
<html>
<head>

<title>Test</title>
</head>
<body>


</body>

</html>

在此处输入图片说明

Are you using a container? 您在使用容器吗? Maybe that could be the problem. 也许这可能是问题所在。

Example: 例:

  <body> <div class="container"> Site goes here </div> </body> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM