Unlike the general CSS syntax, there are two types of syntax for CSS pseudo classes.
First type:
Selector:pseudo-class {Property:value}
You can also use the HTML class attribute to set pseudo classes.
Example:
a:link {color:red}
The second type:
Selector.class:pseudo-class {Property:value}
Pseudo classes are the most commonly used pseudo classes.
Example:
A.c1:link {color:red}
Anchor (a) pseudo class
Anchor (a) pseudo class is the most commonly used pseudo class. Examples are as follows:
a:link {color: #FF0000}/* not visited link red *
a:visited {color: #00FF00}/* has been visited Link green *
a:hover {color: #FFCC00}/* Mouse hover over the link orange *
a:active {color: #0000FF}/* Mouse point active link Blue */
You can also use the HTML class attribute to set pseudo classes. Examples are as follows:
A.c1:link {color: #FF0000}/* not visited link red *
a.c1:visited {color: #00FF00}/* has been visited Link green *
a.c1:hover {color: #FFCC00}/* Mouse hover over the link orange *
a.c1:active {color: #0000FF}/* Mouse point active link Blue */
Example: actived in order to write.
Note: Due to the CSS priority of the relationship (later than the previous priority), in the write a CSS, must be in accordance with A:link, a:visited, A:hover, a:actived the order of writing.