How CSS Sets the hyperlink style

Source: Internet
Author: User

CSS Settings hyperlink styles are implemented by pseudo-classes

(1): Link: Sets the style sheet properties of the A object before it is accessed.

(2): visited: Sets a style sheet property whose link address has been accessed by an object that is outdated.

(3): hover: Sets the style sheet properties of an object when it hovers over it.

(4): Active: Sets the style sheet properties of an object when it is activated by the user (an event that occurs between mouse clicks and releases).

The correct order of four properties for hyperlinks in CSS is:


A:link {}
a:visited {}
a:hover {}
a:active {}

Pseudo-class names are not case sensitive, but are required in the definition order. : hover must be placed: Link and: Visited is valid after: active must be placed: hover is valid after.

Notes

By default, the text color of the hyperlink you create is blue and underlined, and then it becomes purple after you access it. If you want to modify this color, you need to style the A:link, a:visited, A:hover, a:active states of the hyperlink with a CSS style.
Example

<style type= "Text/css" > 
a{text-decoration:none} without underscore 
a:link{color:red} 
A:visited{color:blue} 
A:active{color:yellow} 
a:hover{color:green;font-family: italics; font-size:20} 


Article reprinted from: CSS set hyperlink style http://www.studyofnet.com/news/222.html

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.