為什么我這樣ID標(biāo)簽和類標(biāo)簽無法實(shí)現(xiàn)效果?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>偽類選擇符</title>
<style type="text/css">
a:hover{
? ? color:red;
? ? font-size:20px;
? ??
}
.stree{
? ? color:blue;
}
.first{
? ? font-weight:normal;
}
#second{
? ? font-weight:normal;
}
</style>
</head>
<body>
? ? <h1>勇氣</h1>
? ? <p class="first">三年級(jí)時(shí),我還是一個(gè)<a href="http://idcbgp.cn">膽小如鼠</a>的小女孩,上課從來不敢回答老師提出的問題,生怕回答錯(cuò)了老師會(huì)批評(píng)我。就一直沒有這個(gè)勇氣來回答老師提出的問題。學(xué)校舉辦的活動(dòng)我也沒勇氣參加。</p>
? ? <p id="second">到了三年級(jí)下學(xué)期時(shí),我們班上了一節(jié)公開課,老師提出了一個(gè)很<span class="stree"><a>簡單</a></span>的問題,班里很多同學(xué)都舉手了,甚至成績比我差很多的,也舉手了,還說著:"我來,我來。"我環(huán)顧了四周,就我沒有舉手。</p>
? ? <img src="http://img1.sycdn.imooc.com//52b4113500018cf102000200.jpg" >
</body>
</html>
2019-12-12
#second span {
? ? font-weight:normal;
}
要寫后代選擇器,用空格加上標(biāo)識(shí)