This article mainly introduces the CSS style of a tag in the four states, has a certain reference value, now share to everyone, the need for friends can refer to
A label has four "state" the process is: A:link->a:hover->a:active->a:visited. In addition, a:active can not be set with or without underscores (always there), there is an example below you can see
Represents a connection in all States, such as a{color:red}
①a:link: Link not visited, such as a:link {Color:blue}
②a:visited: visited links, such as A:visited{color:blue}
③a:active: The color of the link when it is activated (when the link gets focus), such as A:active{color:blue}
④a:hover: When you move the mouse over a link, such as a:hover {Color:blue}
The status of the general A:hover and a:visited links (colors, underscores, etc.) should be the same.
The first three correspond to the three attributes of the BODY element link, Vlink, and ALink respectively.
The four "states" of the sequence of the process is: A:link->a:hover->a:active->a:visited. In addition, a:active cannot be set with or without underscores (always there).
Example: Common state values for pseudo-classes
<style type = "Text/css" > a {font-size:16px} a:link {color:blue; text-decoration:none;}//Not visited: Blue, no underline a:active:{co lor:red; }//Activation: Red a:visited {color:purple;text-decoration:none;}//Visited: purple, no underscore a:hover {color:red; Text-decoration: underline;} Mouse Move Up: red, underline </style>
above is the whole content of this article, I hope that everyone's learning has helped, more relevant content please pay attention to topic.alibabacloud.com!