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.
Hover is used to place the cursor over the connection.
Active is used to obtain the connection of the focus (for example, click.
For example:
The code is as follows: |
Copy code |
A: link { Color: red } A: visited { Color: green } A: hover { Color: blue } A: active { Color: orange }
|
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 user opinions, 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 that
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 great headache.