+ 5

What is a pseudo selector?

31st May 2017, 3:04 PM
Sourav gupta
Sourav gupta - avatar
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
31st May 2017, 10:30 PM
Raz
Raz - avatar
+ 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()
2nd Jun 2017, 7:22 PM
Ashish Dubey
Ashish Dubey - avatar
+ 1
https://developer.mozilla.org/en/docs/Web/CSS/Pseudo-classes You can check this out as well for further information.
2nd Jun 2017, 7:24 PM
Ashish Dubey
Ashish Dubey - avatar