Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/75.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.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 移动<;h1>;导航栏上方的标题_Html_Css_Header_Position - Fatal编程技术网

Html 移动<;h1>;导航栏上方的标题

Html 移动<;h1>;导航栏上方的标题,html,css,header,position,Html,Css,Header,Position,在我的程序中,我决定为页面标题添加一个标题。问题是新标题不会出现在导航栏上方。然而,它曾一度奏效;没有连接任何格式设置。现在,我几乎正确地设置了文本的格式(颜色仍然错误),它的位置再次关闭 这是简短的代码: 更多我的代码: #screen {} html { margin: 0; padding: 0; width: 100%; background-color: #DAE6F0; } body { margin: 0; padding: 0

在我的程序中,我决定为页面标题添加一个标题。问题是新标题不会出现在导航栏上方。然而,它曾一度奏效;没有连接任何格式设置。现在,我几乎正确地设置了文本的格式(颜色仍然错误),它的位置再次关闭

这是简短的代码:

更多我的代码:

#screen {}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: #DAE6F0;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
}

#header {
    margin-top: 100px;
    margin-bottom: 45px;
}

#gradient {
    height: 65px;
    margin-bottom: 60px;
    /* IE 10 */
    background-image: -ms-linear-gradient(top, #81a8cb 0%, #1947D1 100%);

    /* Firefox */
    background-image: -moz-linear-gradient(top, #81a8cb, #1947D1); 

    /* Safari  & Chrome */
    background-image: -webkit-gradient(linear,left bottom,left top, color-stop(0, #1947D1),color-stop(1, #81a8cb)); 
    box-shadow: inset 0 0 15px black;
}

h1.name{
    font-family: Lato, 'Courier Bold', sanserif;
    font-weight: bold;
    font-variant: small-caps;
    font-size: 60px;
    margin-left: 30px;
    float:left;
    color: "#335CD6";
}
HTML:


程序辅助
..................... 更多代码
只需删除

float:left;
现在在你的小提琴上很好用

从H1上拆下左侧浮子

h1.name{

    font-family: Lato, 'Courier Bold', sanserif;
    font-weight: bold;
    font-variant: small-caps;
    font-size: 60px;
    margin-left: 30px;

    color: "#335CD6";
    margin-top: 0;
}

为什么要在
标记上方添加
?我将使用它来修复页面不移动。现在如果重新调整窗口大小,所有内容都会移动。我会将您现在应用于
的css添加到
标记中…就像这样:
body{}
好的,但是如何修复我的问题?我目前还没有我的屏幕idI的代码。我将h.name改为h.name(这使它位于顶部),但删除了所有格式。由于某种原因,你的建议也没有改变任何东西。在小提琴中,我还删除了
页边顶部的
哦,我明白了。我删除了空间并添加了这些编辑,效果很好。谢谢我可以问一下为什么这两种格式对我的文本格式有这么大的影响吗?啊,这完全改变了相对于其他标签的位置。但是,由于
h1
标记位于代码中
div
标记的上方,因此它将在浏览器中相应地显示在上方,而不显示cssWith float left,您将
h1
放置在相对于
div
的左侧,但由于没有空间,它将放置在内部
h1.name{

    font-family: Lato, 'Courier Bold', sanserif;
    font-weight: bold;
    font-variant: small-caps;
    font-size: 60px;
    margin-left: 30px;

    color: "#335CD6";
    margin-top: 0;
}