CSS intermediate tutorial CSS pseudo class

Source: Internet
Author: User

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.

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.