今天我们来研究下css的伪类选择器,代码跟效果图如下
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>伪类选择器</title>
<style type="text/css">
a:hover{
color:red /*鼠标移入的颜色*/
}
a:link{
color:yellow/*未访问的颜色*/
}
a:active{
color:green/*选中的颜色*/
}
a:visited{
color:blue/*已访问的颜色*/
}
input:enabled{
background:red;/*可用的颜色*/
}
input:disabled{
background:pink/*不可用的颜色*/
}
</style>
</head>
<body>
<a href="#">Allen classes</a><br />
<hr />
<input type="text" disabled/>
<hr />
<input type="text" />
</body>
</html>