أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
see the response in
https://www.w3schools.com/css/css_pseudo_classes.asp
A Pseudo class in CSS is used to define the special state of an element. It can be combined with a CSS selector to add an effect to existing elements based on their states. For Example, changing the style of an element when the user hovers over it, or when a link is visited. All of these can be done using Pseudo Classes in CSS.
selector: pseudo-class{ property: value; }
selector:pseudo-class { property:value;}
A pseudo-class is used to define a special state of an element.
For example, it can be used to:
A CSS pseudo-class is a keyword added to a selector that specifies a special state of the selected element(s). For example, :hover can be used to change a button's color when the user's pointer hovers over it.
/* Any button over which the user's pointer is hovering */
button:hover { color: blue;}
Syntax
selector:pseudo-class { property: value;}
From my point of view, pseudo-classes in css3 can be used to define a special stateof an element, e.g when the user trys to hover a mouse on top of an element where it can change color
Pseudo-class also can be used to define special rules for different languages.