The hyperlink's initial colour is blue, i.e,, of the visited selector. But the background-colour is black, i.e., of the link selector. Additionally, after visiting the link once, the text colour remains blue as it should be, but the background does not transform to transparent.
(Here is the styling code:)
<style>
a:link {
color: pink;
background-color: black;
text-decoration: none;
}
a:visited {
color: blue;
background-color: transparent;
text-decoration: none;
}
a:hover {
color: red;
background-color: transparent;
text-decoration: underline;
}
a:active {
color: yellow;
background-color: transparent;
text-decoration: underline;
}
</style>
</head>
<body>
<h2>Link Colors</h2>
<a href="html_images.asp" target="_self">HTML Images</a>
</body>
</html>
question from:https://stackoverflow.com/questions/66057834/hyper-link-color-styling-in-css 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…