Get the App
SLTechnology News&Howtos  ›  Development  › 

A tutorial on the design method of css style four-state LVHA for a tag

Shulou Source: shulou.com Published: 2022-06-03 08:20:16 09月22日 Update

This article introduces the "a tag css style four states LVHA design method tutorial" related knowledge, in the actual case operation process, many people will encounter such a dilemma, then let the editor lead you to learn how to deal with these situations! I hope you can read it carefully and be able to achieve something!

Indicates connections in all states such as a {color:red}

① a:link: links are not accessed, such as a:link {color:blue}

② a:visited: visited links, such as a:visited {color:blue}

③ a:active: the color of the link when activated (when the link gains focus), such as a:active {color:blue}

④ a:hover: when you mouse over a link, such as a:hover {color:blue}

In general, the state (color, underscore, etc.) of a:hover and a:visited links should be the same.

The first three correspond to the link, vlink and alink attributes of the body element, respectively.

The sequence of the four "states" is a:link-> a:hover-> a:active-> a:visited. In addition, a:active cannot set whether there is an underscore (there is always one).

For example: common status values of pseudo-classes

The code is as follows:

A {font-size:16px}

A:link {color: blue; text-decoration:none;} / / not accessed: blue, no underscore

A:active: {color: red;} / / Activation: red

A:visited {color:purple;text-decoration:none;} / / visited: purple, no underscore

A:hover {color: red; text-decoration:underline;} / / Mouse move closer: red, underlined

This is the end of the tutorial on the design method of css style four-state LVHA for a tag. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Status links underlines tutorials methods labels styles design content more activation knowledge red process color mouse no bottom practical same learned Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei MySQL Shulou Information MariaDB OPPO Reno