Define Link Styles
CSS prepares specific tools for some special effects, which we call "pseudo-classes". Several of which are commonly used, let's look at the four pseudo-classes that are often used to define link styles, namely:
: Link
: Visited
: hover
: Active
Because we want to define the link style, it is essential that the anchor tag in the hyperlink is--a, the anchor tag and the pseudo-class link up the writing method is the basic method of defining the link style, they are written as follows:
A:link, defines the style of the normal link;
A:visited, defines the style of the link that has been visited;
A:hover, defines the style when the mouse hovers over the link;
A:active, defines the style when the mouse clicks the link.
Example:
The link color defined in the example above is red, the link after the visit is green, the mouse hovers over the link is black, and when clicked, the color is white.
HTML hyperlink font style (mouse hover, click)