【发布时间】:2016-04-03 15:13:04
【问题描述】:
我的索引是:
<html>
<head>
<meta charset="utf-8"
<link href="style.css" rel="stylesheet" />
<title>collapaing Header</title>
</head>
<body>
<div id="container">
<header>
<h1>This is my header </h1>
</header>
<div id="banner">
<h2> This is the banner </h2>
</div>
<div id="content">
<p>Content goes here </p>
</div>
</body>
</html>
我的 CSS 是:
body{
text-align: center;
}
header{
height: 100px;
background: #dbdbdb;
width: 100%;
z-index: 10;
}
.banner{
width: 100%;
height: 500px;
position: fixed;
top: 100px;
background: #707070;
}
.content{
width: 100%;
position: relative;
top: 400px;
height: 1500px;
}
【问题讨论】:
-
真的吗?你把每个字符串都放在
`? -
“不工作” - 我们真的不知道应该如何工作......所以,描述问题。
-
我的 CSS 不工作 apply nothing
-
可能是因为这一行没有正确结束:
-
@bas schreuder tanq 发表评论,但不是