Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/78.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/42.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_Header_Banner - Fatal编程技术网

Html 如何使页眉直接穿过页面?

Html 如何使页眉直接穿过页面?,html,css,header,banner,Html,Css,Header,Banner,我想在页面上拉伸标题,查看下面的图片: 我原本计划在我的包装横幅,但我现在改变了主意,希望它在页面上的权利。我不确定我必须输入什么代码才能实现这一点。下面是我的HTML和CSS (我知道横幅的质量会受到影响,但我现在不担心) HTML: 多谢各位 您需要将横幅从包装上取下,并将其宽度设置为100%: 将您的HTML更改为: <body> <div id="banner"> <a href="index.html"><img src="i

我想在页面上拉伸标题,查看下面的图片:

我原本计划在我的包装横幅,但我现在改变了主意,希望它在页面上的权利。我不确定我必须输入什么代码才能实现这一点。下面是我的HTML和CSS

(我知道横幅的质量会受到影响,但我现在不担心)

HTML:


多谢各位

您需要将横幅从包装上取下,并将其宽度设置为100%:

将您的HTML更改为:

 <body>

 <div id="banner">
     <a href="index.html"><img src="images/banner/banner2.png" width="1000"></a>
 </div>

 <div id="wrapper">
尝试将#包装宽度设置为100%,您的意思是要将图像设置为全屏交叉

以及图像宽度

如果有帮助,谢谢希望。

这里是一个例子

HTML

 <body>
    <div id="wrapper">
        <a href="index.html">
            <div id="banner"></div>
        </a>      
    </div>       
 </body>

请将与OP问题相关的问题作为评论发布
 <body>

 <div id="banner">
     <a href="index.html"><img src="images/banner/banner2.png" width="1000"></a>
 </div>

 <div id="wrapper">
#banner img {width:100%} 
 <body>
    <div id="wrapper">
        <a href="index.html">
            <div id="banner"></div>
        </a>      
    </div>       
 </body>
 body{background-color:slategray;margin:0;}

 #banner{    
    background: red;
    width:100%;
    height:100px;
    border-bottom:2px solid gold;
 }