一、css伪类元素
a:link{
color:red;/*未访问的链接*/
}
a:hover{
color:green;/*鼠标滑过链接*/
}
a:active{
color:pink;/*鼠标点击的效果*/
}
a:visited{
color:blue;/*访问过的链接*/
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>css 伪类元素</title>
<style type="text/css">
a:link{
color: red; /*没有访问过的链接颜色*/
}
a:hover{
color: blue; /*鼠标在链接上滑动的颜色*/
}
a:active{
color:yellow; /*鼠标点击链接时的颜色*/
}
a:visited{
color:green; /*访问过的链接颜色*/
}
</style>
</head>
<body>
<a href="https://www.baidu.com/">百度一下</a><br>
</body>
</html>