爲什麼header > section
標記會採用CSS中已設置的部分的顏色?Css和html顏色設置建議
我試圖讓header > section
沒有顏色,但由於某種原因它使用的是段標記中設置的顏色。
HTML
<div id ="wrapper">
<header>
<section>
<h1>This is Staffordshire</h1>
</section>
<nav>
<ul>
<li><a href="">◊ Home</a></li>
<li><a href="">◊ News Round</a></li>
<li><a href="">◊ Contact Us </a></li>
<li><a href="">◊ About The Town</a></li>
</ul>
</nav>
</header>
<section>
<article>
</article>
</section>
<footer>
</footer>
</div>
CSS
header {
margin-top: 50px;
position: absolute;
top: 0;
display: block;
width: 960px;
height: 150px;
}
section {
display: block;
background-color: #0FF;
width: 960x;
height: 600px;
}
header > section {
border: thick groove #ff0000;
display: block;
width: 300px;
height: 150px;
float: left;
}