What are CSS pseudo-classes

WBOY
Release: 2023-09-16 12:37:02
forward
1022 people have browsed it

什么是 CSS 伪类

CSS pseudo-classes are used to add special effects to certain selectors. You don't need to use JavaScript or any other script to use these effects.

The most commonly used pseudo-classes are -

Value

Description

:link p>

Use this class to add special styling to unvisited links.

:visited

Use this class to add the style of a special visit link.

:hover

Use this class to add a special style to an element when the mouse is hovering over it.

:active

Use this class to add styles for special active elements.

:focus

Use this class to add special styles to an element when it has focus.

:first-child

Use this class to add special styles to the first child element of some other elements.

:lang

Use this class to specify the language to be used in the specified element.

The above is the detailed content of What are CSS pseudo-classes. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!