What is the function and writing order of the a tag pseudo class

What is the function and writing order of the a tag pseudo class
The role of the a tag pseudo-class:

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

":visited": the state that a tag has been visited;

":hover": the state when the mouse is hovering over the a tag;

":active": the state of a tag when it is pressed by the mouse;

When writing styles, why do you write them in this order:

In fact, the essence is still "styles with equal priority, the ones written later will cover the ones in front". The pseudo-class of the a tag is just a combination of different action sequences. The triggering order of the actions determines that the order of the pseudo-classes must be written according to lvha.

Let's briefly talk about these four pseudo-classes:

Because the first two states are normal, and the last two are immediate. When the immediate state is triggered, it will override the normal state, so the two immediate states should be placed at the end.

Because under normal circumstances: if the a tag has been visited, it should be displayed as visited, so visited should be placed after 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 at the end;

Sequential memory techniques:

LV package

<<:  Implementing a table scrolling carousel effect through CSS animation

>>:  JavaScript Document Object Model DOM

Blog    

Recommend

Specific implementation methods of MySQL table sharding and partitioning

Vertical table Vertical table splitting means spl...

Methods and techniques for quickly displaying web page images

1. Use .gifs rather than .jpgs. GIFs are smaller ...

An article to understand what is MySQL Index Pushdown (ICP)

Table of contents 1. Introduction 2. Principle II...

Summary of Common Commands for Getting Started with MySQL Database Basics

This article uses examples to describe the common...

Introduction to new ECMAscript object features

Table of contents 1. Object properties 1.1 Attrib...

Ubuntu compiles kernel modules, and the content is reflected in the system log

Table of contents 1.Linux login interface 2. Writ...

Oracle deployment tutorial in Linux environment

1. Environment and related software Virtual Machi...

Compatibility with the inline-block property

<br />A year ago, there were no articles abo...

Vue + OpenLayers Quick Start Tutorial

Openlayers is a modular, high-performance and fea...

Summary of the use of Datetime and Timestamp in MySQL

Table of contents 1. How to represent the current...

Linux View File System Type Example Method

How to check the file system type of a partition ...