CSS Pseudo-Classes vs Pseudo-Elements | Pseudo-Selectors Tutorial

preview_player
Показать описание

Learn CSS Pseudo-Classes vs Pseudo-Elements in this CSS Pseudo-Selectors tutorial for beginners. Both pseudo-classes and pseudo-elements are used as pseudo-selectors in CSS. Examples of each type of pseudo-selector are provided.

🚀 This lesson is part of a CSS for Beginners tutorial series playlist:

CSS Responsive Card Design | Mini-Project Tutorial for Beginners

(00:00) Intro
(00:05) Welcome
(00:26) Pseudo-Classes vs Pseudo-Elements
(01:38) Starter Code
(02:13) :active
(02:58) :is
(04:06) :any-link
(05:02) Specificity with :is and :where
(07:55) :target
(09:33) :not
(11:31) :nth-child
(13:30) Create a pseudo-element
(14:54) Emoji pseudo-elements
(15:22) Fancy quotes with ::before and ::after
(18:36) ::first-letter
(19:49) ::first-line

⚙ Web Dev Tools:

📚 References:

✅ Follow Me:

Was this tutorial about CSS Pseudo-Classes and Pseudo-Elements helpful? If so, please share. Let me know your thoughts in the comments.

#css #pseudo #classes
Рекомендации по теме
Комментарии
Автор

Thanks so much Dave. You actually cleared the confusion that I have been battling with

judeleon
Автор

Always inspiring and may I even add, thrilling, watching your videos. Something new, and helpful always. Thanks, Gray.

NedumEze
Автор

Hi Dave can you kindly cover the ::before and ::after pseudo elements, love the tutorials keep it up :)!!

mohamedabdelrazig
Автор

When you say .card p::before or .card p::after, am I right in my understanding that for pseudo-elements, their immediate parent are considered to be "p"?

andromilk
Автор

I wasn't aware of :is, :where and :any pseudo classes 🤦‍♂
the cool thing about :first-line pseudo element is that is always selects the first line even when it wraps to a multiple lines,


Thanks Dave, soon you'll hit the 50K subs, Congrats in advance (just in case I missed the event)🎉

ahmad-murery
Автор

Hey, Dave! I learn CSS from you. Amazing lessons. I like your teaching technique. I follow you on my VSCode and I noticed that paragraph and quotes go over the nav element if you scroll all the way down. You can see it at the last seconds of this lesson. I suspect ::before and ::after have some kind of layer to them, something like z-index. Should we use something else to avoid this or make some change to nav?

vladimirshnyakin
Автор

Is it allowed to replace :is(a:hover, a:focus) with a:is(:hover, :focus) to make it even shorter?

stanislavaksenov
Автор

Can you please upload a react native course for beginners ❤️

morningstar
Автор

Thanks for the video! Can I ask which extension you use for the bracket line highlight??

min