你好,老师。访问链接时访问一个链接后,另外两个链接也改变了颜色。帮忙看一下代码是否正确
<!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>伪类练习</title>
<style type="text/css">
a {
text-decoration: none;
}
a:link {
color: orange;
}
a:hover {
font-size: 20px;
border: 1px solid red;
}
.suit a:visited {
color: green;
}
.wc a:visited {
color: rgb(54, 42, 216);
}
.skin a:visited {
color: rebeccapurple;
}
</style>
</head>
<body>
<h2>商品列表</h2>
<p class="suit">
<a href="#">衣服鞋帽</a>
</p>
<p class="wc">
<a href="#">厕所清洁</a>
</p>
<p class="skin">
<a href="#">化妆用品</a>
</p>
</body>
</html>
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星