An Interest In:
Web News this Week
- April 19, 2024
- April 18, 2024
- April 17, 2024
- April 16, 2024
- April 15, 2024
- April 14, 2024
- April 13, 2024
August 26, 2021 03:54 pm GMT
Original Link: https://dev.to/a89529294/bite-sized-css-pseudo-classes-vs-pseudo-elements-1fmf
Bite-Sized CSS: Pseudo Classes vs. Pseudo Elements
Pseudo Classes
- Starts with one colon.
- Deals with states, such as button:hover, button:focus.
- Selects the whole element.
- MDN Pseudo Classes
Pseudo Elements
- Starts with double colons, ::before, ::first-letter, etc.
- Selects part of the element.
- MDN Pseudo Elements
Original Link: https://dev.to/a89529294/bite-sized-css-pseudo-classes-vs-pseudo-elements-1fmf
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To