一:确认是否按照 a:link a:visited a:hover a:active 的顺序定义样式(联想记忆:love hate)
二:如果所有链接的href属性一样(指向同一个地址),那么你点其中一个链接,其他链接也将显示被访问过
————————————————
原文链接:https://blog.csdn.net/weixin_39068791/article/details/80656011
**附:a标签相关CSS常规样式**
- a:link,定义正常链接的样式;
- a:visited,定义已访问过链接的样式;
- a:hover,定义鼠标悬浮在链接上时的样式;
- a:active,定义鼠标点击链接时的样式。
e.g.
a:link {
color: #FF0000;
text-decoration: none;
}
a:visited {
color: #cccccc;
text-decoration: none;
}
//简记:love
a:hover {
color: yellow;
text-decoration: underline;
}
a:active {
color: green;
text-decoration: none;
}
//简记:hate