なぜ私のものが機能していないのかわかりませんa:first-child
。これが私のhtmlです:
<!DOCTYPE html>
<link href='http://fonts.googleapis.com/css?family=Geo' rel='stylesheet'>
<title>Mira's place</title>
<header>
<a href="index.html">Mira's place</a><br>
<h2>“<span id="quote">If nothing, then this.</span>”</h2>
<ul>
<li><a href="#">Home</a>
<li><a href="#">Games</a>
<li><a href="#">Pixel Art</a>
<li><a href="#">Contact</a>
</ul>
</header>
<section>
<h2>This is test H2</h2>
<p>This is lorem ipsum shitsum, blah <a href="#">Test</a> blah baldflksafdjsl adslkf ajfdlks ajfldsa jflksda lfhsdalf jdsalfh sdlfdshfdsk fjsdl ajfl
</section>
<footer>
<p>(C) MiraCZ 2013 - You can copy anything here!
</footer>
これが私のCSSです
html {
background-color: #002240;
font-family: "Geo", sans-serif;
margin: 0;
}
header {
background-color: #001629;
margin: 0 -10px 0 -10px;
}
a:first-child {
color: #FF628C;
font-size: 36px;
}
header h2 {
color: #80FFBB;
}
li {
display: inline-block;
font-size: 18px;
}
p {
color: white;
}
a
最初に36pxサイズにしたいだけです。なぜそれが他a
の人に影響を与えるのか、誰でも助けることができますか? これが私のjsfiddle http://jsfiddle.net/dsT4Z/です
これが私が見るものです。a
そのサイズにしたくないものなどを示すために赤い矢印を追加しました.