CSS的复合选择器之链接伪类选择器
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS的复合选择器之链接伪类选择器</title>
<style>
/* 未访问的链接 a:link 把没有访问过的链接选出来 */
a:link {
color: purple;
text-decoration: none;
}
/* a:visited 把访问过的链接选出来 */
a:visited {
color: orange;
}
/* a:hover 鼠标经过的链接,变蓝色, */
a:hover {
color: blue;
}
/* a:active 鼠标点击此链接,新页面未打开时变红色 */
a:active {
color: red;
}
</style>
</head>
<body>
<a href="#">小猪佩奇</a>
</body>
</html>