Example
Specify the color of the link:
a:link {color: #FF0000}/* The link not visited */ a:visited {color: #00FF00}
* has been visited */a:hover {color: #FF00FF}/ * when there is a mouse hover over the link */a:active {colo R: #0000FF}/ * selected link */
Definition and Usage
: The visited pseudo-class adds a special style to the visited link.
Description
Active, visited, inaccessible, or links that hover over them are displayed in different ways in a browser that supports CSS:
a:link {color: #FF0000}/ * not visited link */a:visited {color: #00FF00}/ * visited link */a:hover {color: #FF00FF}/ * when there is a mouse hover */a:active {color: #0000FF}/ * selected link on link */
Note: In order to produce the desired effect, in the CSS definition, a:hover must be located after A:link and a:visited!!
Note: In order to produce the desired effect, in the CSS definition, a:active must be located after A:hover!!
Note: The name of the Pseudo-class (pseudo-Class) is not case sensitive.
Note: Pseudo-classes can be used in conjunction with CSS classes:
a.red:visited {color: #FF0000;}
<a class= "Red" href= "css_syntax.asp" >css syntax</a>
If the link in the example above has been accessed, it will appear in red.
CSS (3)--visited pseudo-Class