<a href="https://www.w3schools.com/html/" target="_blank">
w3school
</a>
css是:
a:link {
color: blue;
text-decoration: overline underline;
}
a:visited {
color: green;
text-decoration: line-through;
}
a:hover {
color: red;
text-decoration: underline;
}
a:active {
color: black;
text-decoration: overline;
}
被访问后,文本颜色为绿色,这是正确的。但是,文本修饰是上划线和下划线,而不是line-through :visited is partially working。看来颜色是级联的,而文字装饰不是。有人可以解释一下吗?
我正在尝试在CSS中为锚标记添加伪代码,即链接,已访问,悬停并处于活动状态。 html是: w3school
:visited
状态使用的样式-否则,通过JavaScript检查布局的某些更改可以确定您是否已经访问了外部URL。文字修饰