Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/396.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
Javascript 如何降低文本正文但不使其成为页脚?_Javascript_Html_Css_Xcode_Web - Fatal编程技术网

Javascript 如何降低文本正文但不使其成为页脚?

Javascript 如何降低文本正文但不使其成为页脚?,javascript,html,css,xcode,web,Javascript,Html,Css,Xcode,Web,HTML [现在是什么样的站点,我只想把主体部分移低一点 基本上,我希望文本主体向下移动,以便在首次加载到站点时看不到它,我希望在首次加载到站点时.coverpic居中,并且在开始滚动时可以看到“关于”部分。在文本中添加类(p标记): 根据您希望文本变低的程度,相应地调整页边距顶部 编辑:例如,将“关于”部分中的“颜色”更改为黑色。基本上,您现在有白色对白色 您还会注意到,我在about section和sample类上都添加了margin top:50px。第一个margin top向下显示标

HTML

[现在是什么样的站点,我只想把主体部分移低一点

基本上,我希望文本主体向下移动,以便在首次加载到站点时看不到它,我希望在首次加载到站点时.coverpic居中,并且在开始滚动时可以看到“关于”部分。

在文本中添加类(p标记):

根据您希望文本变低的程度,相应地调整页边距顶部

编辑:例如,将“关于”部分中的“颜色”更改为黑色。基本上,您现在有白色对白色

您还会注意到,我在about section和sample类上都添加了margin top:50px。第一个margin top向下显示标题,第二个向下显示文本

.sample {
  margin-top: 50px;
}

你可以在css中使用margine top。 你想降低哪一个文本,只需在css margine top中写入:以及你想要的px。 例如

    .about-section {
    background-image:       
    url(file:///C:/Users/jakes/nwcWebsitecity.png);
    height: auto;
    width: 100%;
    position: relative;
    font-family: 'Josefin Sans', sans-serif;
    color: black;
    text-align: center;
    transform: rotate(180);
    margin-top: 50px;
  }



 .sample {
      margin-top: 50px;
    };

< P> >在中间屏幕,或是低或更高,以使其处于正确位置

现在文本不出现,请看我原来注释中的编辑。现在您应该很好地去。您可以使用<代码>高度:100VH;第一部分,这样它将与窗口内容一样高。
<p class= "sample">
.sample {
  margin-top: 50px;
}
    .about-section {
    background-image:       
    url(file:///C:/Users/jakes/nwcWebsitecity.png);
    height: auto;
    width: 100%;
    position: relative;
    font-family: 'Josefin Sans', sans-serif;
    color: black;
    text-align: center;
    transform: rotate(180);
    margin-top: 50px;
  }



 .sample {
      margin-top: 50px;
    };
    h1 {
margine-top: 50%;}