使用CSS设置所有访问过的链接的样式
要设置所有访问链接的样式,请使用CSS:visited选择器。
示例
您可以尝试运行以下代码来实现:visited选择器
<!DOCTYPE html>
<html>
<head>
<style>
a:link, a:visited {
background-color: white;
color: black;
border: 1px solid blue;
padding: 30px 30px;
text-align: center;
text-decoration: none;
display: inline-block;
}
a:hover, a:active {
background-color: red;
color: white;
}
</style>
</head>
<body>
<a href = "demo.html" target="_blank">Demo Link</a>
</body>
</html>热门推荐
10 我老公蛋糕祝福语简短
11 托班祝福语大全简短
12 女儿生日简短祝福语幽默
13 公司生日祝福语员工简短
14 疫情对妈妈祝福语简短
15 关于旅游的简短祝福语
16 虎年幽默搞笑简短祝福语
17 嫂子生日祝福语霸气简短
18 简短的古风生日祝福语