Web page Making Tutorial: Understanding the Pseudo class of CSS

Source: Internet
Author: User
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.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.