请问一下我的这段代码中<div id="c"></div>所对应的
#c{
height:30px;
background:green;
}
为什么不生效啊
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Apple</title>
<link rel="stylesheet" href="E:\作业\Apple.css">
<script src="E:\作业\js\jquery\2.0.0\jquery.min.js"></script>
<link rel="stylesheet" href="E:\作业\css\bootstrap\3.3.6\bootstrap.min.css">
<script src="E:\作业\css\bootstrap\3.3.6\bootstrap.min.js"></script>
</head>
<body>
<header>
<div>
<div id="advertisement">
<p><广告></p>
</div>
<div id="navigation">
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/apple/image_large.svg" id="a1">
</a>
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/links/mac/image_large.svg" class="a">
</a>
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/links/ipad/image_large.svg" class="a">
</a>
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/links/iphone/image_large.svg" class="a">
</a>
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/links/watch/image_large.svg" class="a">
</a>
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/links/music/image_large.svg" class="a">
</a>
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/links/support/image_large.svg" class="a">
</a>
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/search/image_large.svg" class="a">
</a>
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/bag/image_large.svg" class="a">
</a>
</div>
</div>
</header>
<!-- 这里是header -->
<div id="body">
<center>
<div>
<span>
<br><br>
<img src="https://www.apple.com/v/home/dx/images/logos/iphone_xs_logo_hero_large.png">
<br>
<h3>大屏幕见。</h3>
<a href="">进一步了解></a>
<a href="">购买></a>
</span>
<img src="https://www.apple.com/v/home/dx/images/heroes/iphone-xs/iphone_xs_large.jpg">
</div>
</center>
<!-- 第一部分 -->
<center>
<div class="b">
<span>
<br><br>
<img src="https://www.apple.com/v/home/dx/images/logos/iphone_xr_logo_hero_large.png">
<br>
<h3>哪一面都是亮点。</h3>
<h4>10月19日预购</h4>
</span>
<img src="https://www.apple.com/v/home/dx/images/heroes/iphone-xr/iphone_xr_large.jpg">
</div>
</center>
<!-- 第二部分 -->
<div id="c"></div>
</div>
</body>
</html>
*{
margin:0;
}
header{
width:100%;
height:100px;
}
#advertisement{
width:100%;
height:50px;
background:#444444;
position:fixed;
}
#advertisement p{
font-size:0.9em;
display:block;
width:50px;
height:20px;
position:absolute;
right:300px;
top:16px;
color:white;
}
#navigation{
width:100%;
height:100px;
opacity:0.9;
background:#323232;
position:fixed;
}
#navigation #a1{
margin-left:250px;
margin-top:54px;
}
#navigation .a{
margin-top:54px;
margin-left:80px;
}
#body{
width:100%;
height:5000px;
background:red;
}
#body div{
width:100%;
height:608px;
background:black;
}
#body span{
display:block;
width:100%;
height:250px;
background:pink;
color:white;
}
#body a{
font-size:20px;
}
#body a:last-of-type{
margin-left:30px;
}
.b{
margin-top:10px;
}
#c{
height:30px;
background:green;
}
#c{
height:30px;
background:green;
}
为什么不生效啊
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Apple</title>
<link rel="stylesheet" href="E:\作业\Apple.css">
<script src="E:\作业\js\jquery\2.0.0\jquery.min.js"></script>
<link rel="stylesheet" href="E:\作业\css\bootstrap\3.3.6\bootstrap.min.css">
<script src="E:\作业\css\bootstrap\3.3.6\bootstrap.min.js"></script>
</head>
<body>
<header>
<div>
<div id="advertisement">
<p><广告></p>
</div>
<div id="navigation">
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/apple/image_large.svg" id="a1">
</a>
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/links/mac/image_large.svg" class="a">
</a>
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/links/ipad/image_large.svg" class="a">
</a>
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/links/iphone/image_large.svg" class="a">
</a>
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/links/watch/image_large.svg" class="a">
</a>
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/links/music/image_large.svg" class="a">
</a>
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/links/support/image_large.svg" class="a">
</a>
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/search/image_large.svg" class="a">
</a>
<a href="">
<img src="https://www.apple.com/ac/globalnav/4/zh_CN/images/globalnav/bag/image_large.svg" class="a">
</a>
</div>
</div>
</header>
<!-- 这里是header -->
<div id="body">
<center>
<div>
<span>
<br><br>
<img src="https://www.apple.com/v/home/dx/images/logos/iphone_xs_logo_hero_large.png">
<br>
<h3>大屏幕见。</h3>
<a href="">进一步了解></a>
<a href="">购买></a>
</span>
<img src="https://www.apple.com/v/home/dx/images/heroes/iphone-xs/iphone_xs_large.jpg">
</div>
</center>
<!-- 第一部分 -->
<center>
<div class="b">
<span>
<br><br>
<img src="https://www.apple.com/v/home/dx/images/logos/iphone_xr_logo_hero_large.png">
<br>
<h3>哪一面都是亮点。</h3>
<h4>10月19日预购</h4>
</span>
<img src="https://www.apple.com/v/home/dx/images/heroes/iphone-xr/iphone_xr_large.jpg">
</div>
</center>
<!-- 第二部分 -->
<div id="c"></div>
</div>
</body>
</html>
*{
margin:0;
}
header{
width:100%;
height:100px;
}
#advertisement{
width:100%;
height:50px;
background:#444444;
position:fixed;
}
#advertisement p{
font-size:0.9em;
display:block;
width:50px;
height:20px;
position:absolute;
right:300px;
top:16px;
color:white;
}
#navigation{
width:100%;
height:100px;
opacity:0.9;
background:#323232;
position:fixed;
}
#navigation #a1{
margin-left:250px;
margin-top:54px;
}
#navigation .a{
margin-top:54px;
margin-left:80px;
}
#body{
width:100%;
height:5000px;
background:red;
}
#body div{
width:100%;
height:608px;
background:black;
}
#body span{
display:block;
width:100%;
height:250px;
background:pink;
color:white;
}
#body a{
font-size:20px;
}
#body a:last-of-type{
margin-left:30px;
}
.b{
margin-top:10px;
}
#c{
height:30px;
background:green;
}