A Pseudo-class (Pseudo classes) is a bolt used to specify the status of one or more of its selection characters. They are in the form of selector: pseudo class {property: value;}, which is separated by a half-width English colon.
Many CSS suggestions are not supported by browsers, but there are four pseudo classes that can be safely used for connection.
Link is used for the access connection.
Visited is used on a connection that has been accessed.
Active is used to obtain the connection of the focus (for example, click.
Hoverhover is used to place the cursor over the connection.
The code is as follows: |
Copy code |
A. snowman: link { Color: blue; } A. snowman: visited { Color: purple; } A. snowman: active { Color: red; } A. snowman: hover { Text-decoration: none; Color: blue; Background-color: yellow; }
|
Note:
Although CSS gives you the control to bypass, it is a good habit to use different colors to indicate the connections that have been accessed, because many users still expect this. Pseudo classes (except hover) are not commonly used. Therefore, it is not as useful as in the past. However, if you can collect comments from common users, you will find that you should use it.
Traditionally, the connection text is blue and the Accessed connection is purple. Perhaps, this is the most effective and useful color. However, with the wide development of CSS, this color will not be normal, and the user will not assume that the connection must be blue or purple.
Note:
You should also be able to use the hover pseudo class on other elements except for the connection. Unfortunately, Internet Protocol E does not. This is really a big headache, because there are a lot of tips on other browsers to make your page look more pleasant.