CSS link
CSS Link
Different links can have different styles.
Link style
The link style can use any CSS properties (such as color, font, background, etc.).
Special links can have different styles, depending on their status.
The four link statuses are:
a:link - normal, unvisited link
a:visited - link that the user has visited
a:hover - when the user mouses over the link
a:active - the moment the link is clicked
注释:为了使定义生效,a:hover 必须位于 a:link 和 a:visited 之后!!
注释:为了使定义生效,a:active 必须位于 a:hover 之后!!
When set to several link status styles, there are also some sequences Rules:
a:hover must follow a:link and a:visited
a:active must follow a:hover
Common link styles
Based on the example of the color change of the link above, see what state it is in.
Let’s move on to link styles through some other common ways:
Text-decoration
text-decoration Attribute Main Used to remove underscores from links:
注意: hover必须在:link和 a:visited之后定义才有效.
注意:active必须在hover之后定义是有效的.