CSS (3)--visited pseudo-Class

Source: Internet
Author: User


Specify the color of the link:

a:link {color: #FF0000}/* The link     not visited */ a:visited {color: #00FF00}  * has been visited */a:hover {color: #FF00FF}/    * when there is a mouse hover over the link */a:active {colo R: #0000FF}/   * selected link */

Definition and Usage

: The visited pseudo-class adds a special style to the visited link.


Active, visited, inaccessible, or links that hover over them are displayed in different ways in a browser that supports CSS:

a:link {color: #FF0000}/     * not visited link */a:visited {color: #00FF00}/  * visited link */a:hover {color: #FF00FF}/    * when there is a mouse hover */a:active {color: #0000FF}/   * selected link on link */

Note: In order to produce the desired effect, in the CSS definition, a:hover must be located after A:link and a:visited!!

Note: In order to produce the desired effect, in the CSS definition, a:active must be located after A:hover!!

Note: The name of the Pseudo-class (pseudo-Class) is not case sensitive.

Note: Pseudo-classes can be used in conjunction with CSS classes:

a.red:visited {color: #FF0000;}<a class= "Red" href= "css_syntax.asp" >css syntax</a>

If the link in the example above has been accessed, it will appear in red.

CSS (3)--visited pseudo-Class

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.