+ 5
What is a pseudo selector?
3 Antworten
+ 7
it is used to define a special state of an element.
Example it can be used to:
-style an element when a mouse user mouses over it.
-style visited and un visited links differently
-style an element when it get focused
for more visit:
https://www.w3schools.com/css/css_pseudo_classes.asp
+ 2
A CSS pseudo-class is a keyword added to a selector that specifies a special state of the element(s) to be selected. For example, :hoverwill apply a style when the user hovers over the element(s) specified by the selector.
Pseudo-classes, together with pseudo-elements, let you apply a style to an element not only in relation to the content of the document tree, but also in relation to external factors like the history of the navigator (:visited, for example), the status of its content (like :checked on some form elements), or the position of the mouse (like :hover, which lets you know if the mouse is over an element or not).
Syntax
How to read CSS syntax. selector:pseudo-class { property: value; }
pseudo-classes
:active
:any
:checked
:default
:dir()
:disabled
:empty
:enabled
:first
:first-child:
first-of-type
:fullscreen
:focus
:hover
:indeterminate
:in-range
:invalid
:lang()
:last-child
:last-of-type
:link
:not()
:nth-child()
:nth-last-child()
+ 1
https://developer.mozilla.org/en/docs/Web/CSS/Pseudo-classes
You can check this out as well for further information.