Get the App
SLTechnology News&Howtos  ›  Development  › 

The use of pseudo-classes of a tag in css

Shulou Source: shulou.com Published: 2022-06-03 17:30:43 10月01日 Update

This article introduces the relevant knowledge of "the use method of a tag pseudo-class in css". In the operation process of actual cases, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

1. The writing order must be link before visit, visited after visit, hover when mouse moves, active when mouse clicks.

Note: The weights of pseudo-classes are the same, and the hierarchy written later is written first.

2, usually set the state before and after the visit to the same effect.

Ensure the unity of the page, you can selectively set the mouse movement and mouse click state.

examples

a:link,a:visited { color: #666;}a:hover { color: #f00;}

Note: Other tags can also be set to:hover pseudo-class status.

"css a tag pseudo-class use method" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!

Tags: Mouse label state usage method content more knowledge mobile practical same learned next optional dilemma example actual hierarchical situation effect Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Shulou Information MariaDB OPPO Reno NVidia