Ordering of connection properties in CSS

Source: Internet
Author: User

In the properties of a CSS hyperlink, there are four ways to connect:

A:link a:hover a:visited A:acticve

Before the use of the time has been in accordance with the order of self-thought, is the sort of L H V A, but sometimes found that it does not work, to find some information, but also on the internet to find a bit, there are many people asked this question, if it is in this order, sometimes displayed correctly, And sometimes the display is not correct, the reason, this may be due to the browser's recognition of the problem caused, also the amount can have the reason for the cache in the personal feel, and the most correct wording should be L V H, for example:

<! DOCTYPE html>"en">"UTF-8"> <title>Document</title> <style type="Text/css">a:link{color:red; Text-Decoration:none;        } a:visited{Color:green; Text-Decoration:underline;        } a:hover{Color:yellow; Text-Decoration:none;        } a:actived{color:red; Text-Decoration:none; }    </style>"#"> Baidu </a></body>

All the connections, if you need to use these four pseudo-classes, in either case, as long as the order in this sequence is absolutely no error.

Again, the correct sequence is: L V H A

Ordering of connection properties in CSS

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.