1. 程式人生 > >H5 css偽類選擇器

H5 css偽類選擇器

<html>
<head>
<meta charset="utf-8">
<title>常用選擇器</title>
<style>
span{color:red;}
#bei{color:green;}
.qu{color:red;}
#qu,.lai,i{color:yellow;}
.fu .one{color:red;}
input[type=text]{color:green}
input[type=submit]{color:red}
a:link{color:red;}
a:visited{color:green;}
a:hover{color:yellow}
a:active{color:blue}
</style>
</head>
<body>
<span>兩人對酌山花開</span><br/>
<p id="bei">一杯一杯復一杯</p><br/>
<b class="qu">我醉欲眠卿且去</b><br/>
<u class="lai">明朝有意抱琴來</u><br/>
<cite id="qu">日本晁卿辭帝都</cite><br/>
<i>征帆一片繞蓬壺</i>
<sub>明月不歸沉碧海</sub>
<sup>白雲愁色滿蒼梧</sup>
<div class="fu">
<div class="one">舊苑荒臺楊柳新</div>
<div class="two">菱歌清唱不勝春</div>
<div class="three">只今惟有西江月</div>
</div>
<div class="one">曾照吳王宮裡人</div>

<input type="text" />
<input type="checkbox" />
<input type="submit" />
<input type="button" />
<input type="password" /><br/>
<a href="http://www.baidu.com">百度</a>

</body>
</html>