<!DOCTYPE html>
<html lang="zn">
<head>
<meta charset="UTF-8">
<title>a元素的伪类</title>
<style>
/*
:link 用来表示没访问过的链接(正常的链接)
*/
a:link{
color: red;
}
/*
:visited 用来表示访问过的链接
由于隐私的原因,所以visited这个伪类只能修改链接的颜色
*/
a:visited{
color: orange;
}
/*
:hover 用来表示鼠标移入的状态
*/
a:hover{
color: aqua;
font-size: 50px;
}
/*
:active 用来表示鼠标点击
*/
a:active{
color: yellowgreen;
}
</style>
</head>
<body>
<!--
1. 没有访问过的链接
2. 访问过的链接
-->
<a href="https://www.baidu.com/">访问过的链接</a>
<br><br>
<a href="https://www.baidu123.com/">没访问过的链接</a>
</body>
</html>
019-a元素的伪类
最新推荐文章于 2022-07-31 17:00:00 发布