CSS defines hyperlinks in a sequential order. Otherwise, there may be bugs in some browsers where a style does not work. The desired effect is not displayed correctly.
The order in which CSS properties are arranged: L-v-h-a.
L-v-h-a is a shorthand for link, visited, hover, and active.
Each of them represents
A:link Default style for hyperlinks
A:visited visited (already seen) Link styles
A:hover link style with mouse hover state
A:active when the left mouse button is pressed, is activated (is the mouse down that moment) link style.
The normal order is as follows:
Copy Code code as follows:
A:link{color: #333; text-decoration:none;}
a:visited {color: #333; text-decoration:none;}
a:hover {color: #FF6600; text-decoration:underline;}
a:active {text-decoration:none; color: #FF6600; text-decoration:none;}
This is how we write our daily work.
Copy Code code as follows:
A {color: #252525; text-decoration:none;}
a:visited {text-decoration:none;}
a:hover {color: #ba2636; text-decoration:underline;}
a:active {color: #ba2636;}
Now everyone is looking at is not simple, clear.