Javascript 如何使html内容在标题元素下方滚动?
在我的head元素下有一个用作标题的图像,但其余内容不会在下面流动。这是我的CSS的标题Javascript 如何使html内容在标题元素下方滚动?,javascript,jquery,html,css,Javascript,Jquery,Html,Css,在我的head元素下有一个用作标题的图像,但其余内容不会在下面流动。这是我的CSS的标题 #header { left:0px; width:100%; top:0px; position:fixed; } <head> <title>MyWebPage</title> <img src="../../Pictures/header.jpg" id="header" /> ... 标题的html代码 #header { le
#header {
left:0px;
width:100%;
top:0px;
position:fixed;
}
<head>
<title>MyWebPage</title>
<img src="../../Pictures/header.jpg" id="header" />
...
标题的html代码
#header {
left:0px;
width:100%;
top:0px;
position:fixed;
}
<head>
<title>MyWebPage</title>
<img src="../../Pictures/header.jpg" id="header" />
...
我不确定是否必须在页眉或正文中添加任何样式,以便当用户在网页上下移动时,正文的内容在页眉下方滚动,因为内容在页眉上方滚动。首先,为什么要将图像放入head元素中?我不这么认为,你们有可能吗 z-index属性定义了哪些元素相互重叠/重叠,z-index越高,元素在层次结构顶部的位置就越高 刚定
#header {
left:0px;
width:100%;
top:0px;
position:fixed;
z-index: 999;
}
它会在上面
有关z索引检查的详细信息请在
#标题上设置更高的z索引
为什么要在
部分放置图像?我想你可能想把它放在
中的
下。