Typefully

🧵 Thread

Avatar

Share

 • 

3 years ago

 • 

View on X

A Guide to CSS Pseudo-classes:🧵↓
Hey developers, I would like to introduce you to an amazing app @DevBytesApp It provides daily news about languages such as Python, JavaScript, and many tech stacks like Web, Android, etc. It gives you crisp content in just 64 words Highly recommended: t.co/ZXIOms26EB
CSS pseudo-classes are used to style elements based on their state or position within the document tree. Below I have listed out all the pseudo-classes used in CSS.
:active - selects an element that is being activated, such as a button is clicked :checked - selects an element that is checked, such as a checkbox or radio button :visited- selects an element that has been visited
:disabled - selects an element that is disabled :empty - selects an element that is empty :enabled - selects an element that is enabled :visited - selects an element that has been visited
:first-child- selects an element that is the first child of its parent :first-of-type - selects an element that is the first of its type within its parent :focus - selects an element that has focus, such as an input field that is being typed in
:hover - selects an element when the user hovers over it with their mouse :in-range - selects an element whose value is within a specified range :invalid - selects an element with an invalid value
:last-child - selects an element that is the last child of its parent :last-of-type - selects an element that is the last of its type within its parent :nth-child(n) - selects an element that is the nth child of its parent, where n is a positive integer
:nth-last-child(n) - selects an element that is the nth child of its parent, counting from the last child :nth-last-of-type(n) - selects an element that is the nth of its type within its parent, counting from the last child
:nth-of-type(n) - selects an element that is the nth of its type within its parent :only-child - selects an element that is the only child of its parent :only-of-type - selects an element that is the only element of its type within its parent
That's all for now. If you enjoyed reading this thread, please : ✔ Like the thread❤️ ✔ Retweet the first tweet. ✔ Follow me @Damn_coder for more such content.
Avatar

D-Coder

@Damn_coder

Sharing Insights on AI, Online business & Productivity | Helping people leverage AI & make money online | DM for collaboration | dcoderhere@gmail.com📤