css| Tutorials | Web page
Understanding the Pseudo class of CSS
A pseudo class (Pseudo classes) is a bolt of a selector that specifies the state of a selector that is or is related to it. They are in the form of Selector:pseudo class {Property:value}, simply separating the selectors and pseudo classes with a half-width English colon (:).
Many of the suggestions for CSS are not supported by browsers, but there are four of them that can be used securely in connection with the pseudo class.
- Link is used on the connection that is being accessed.
- Visited is used on connections that have already been accessed.
- Active is used to get the focus (for example, clicked) on the connection.
- Hoverhover for the connection to which the mouse cursor is positioned.
A.snowman:link {Color:blue} a.snowman:visited {color:purple;} a.snowman:active {color:red;} a.snowman:hover {Te Xt-decoration:none; Color:blue; Background-color:yellow; }
Attention
Although CSS gives you the right to circumvent control, it is a good practice to use different colors to indicate which connections have been visited, as many users have expected. Pseudo class (except hover) is not commonly used, I am afraid it is not used in the past. So it's not as useful as it used to be. But if you can collect comments from a common user, you'll find that you should use it.
Traditionally, the connection text is blue and the visited connection is purple. Perhaps, this is the most effective and useful color. However, with the extensive development of CSS, this color will not be normal, users also no longer assume that the connection must be blue or purple.
should also note
You should also be able to use the hover pseudo class on other elements other than the connection. Unfortunately, Internet explore are not supported. This is really a great annoyance, because there are a lot of tips on other browsers to make your page look more enjoyable.