Home >Web Front-end >HTML Tutorial >What is the function and writing order of a tag pseudo-class_HTML/Xhtml_Web page production

What is the function and writing order of a tag pseudo-class_HTML/Xhtml_Web page production

WBOY
WBOYOriginal
2016-05-16 16:39:451556browse

The role of the a tag pseudo-class:

":link": the status that the a tag has not been visited;

":visited": the a tag has been visited status;

":hover": the status when the mouse is hovering over the a label;

":active": the status when the a label is pressed by the mouse;

When writing styles, you should write them in this order:

In fact, the essence is still "styles with equal priority, the ones written at the back will overwrite the previous ones", the pseudo-class of the a tag only But it combines different action sequences. The triggering sequence of actions determines that the order of pseudo-classes must be written according to lvha.

The following is a brief description of these four pseudo-classes:

Because the first two states are normal, and the latter two are immediate states, when the immediate state is triggered When it is normal, it needs to cover the normal state, so the two immediate states should be placed behind;

Because in the normal state: if the a tag has been visited, it will show the visited status, so visited should be placed after the link ;

Because when the mouse is pressed, it is accompanied by the hovering a label, so if you want active to cover hover, you must put active behind;

Sequential memory skills:

lv package is useful

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn