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

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ธ.ค. 2024

ความคิดเห็น •

  • @DaveGrayTeachesCode
    @DaveGrayTeachesCode  2 ปีที่แล้ว +2

    Both pseudo-classes and pseudo-elements can be very confusing for CSS beginners. However, once you learn more about them, they are easy to apply and very useful! In this tutorial, we look at both pseudo-classes and pseudo-elements, compare their differences, and learn how to apply them to a web page. If you are just starting with CSS, I recommend going to the beginniners of this CSS for Beginners playlist: th-cam.com/play/PL0Zuz27SZ-6Mx9fd9elt80G1bPcySmWit.html

  • @judeleon8485
    @judeleon8485 2 ปีที่แล้ว

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

  • @NedumEze
    @NedumEze 2 ปีที่แล้ว

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

  • @Grihlo
    @Grihlo 2 ปีที่แล้ว

    Thank you for another video-lesson!

  • @mohamedabdelrazig6920
    @mohamedabdelrazig6920 2 ปีที่แล้ว

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

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว

      Hi Mohamed - I do cover both of those pseudo elements in this video 💯

    • @mohamedabdelrazig6920
      @mohamedabdelrazig6920 2 ปีที่แล้ว

      @@DaveGrayTeachesCode You are amazing!!! my apologies only saw the chapter names 😔

  • @ahmad-murery
    @ahmad-murery 2 ปีที่แล้ว

    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)🎉

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว +1

      You're so kind, Ahmad 🙏 Thank you for joining me on this journey, my friend! 🚀

    • @ahmad-murery
      @ahmad-murery 2 ปีที่แล้ว

      @@DaveGrayTeachesCode My pleasure my friend,
      you're so generous to put all this good stuff for free.

    • @homail227
      @homail227 ปีที่แล้ว

      @@ahmad-murery are you from Pakistan

    • @ahmad-murery
      @ahmad-murery ปีที่แล้ว

      @@homail227 No, I'm from Syria

  • @min0234
    @min0234 2 ปีที่แล้ว

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

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว +1

      I previously used the VS Code extension Bracket Pair Colorizer 2, but now, it has native support in VS Code with no extension needed - and that is what you see in this video. Link: digitaldrummerj.me/vscode-bracket-pair-colorization/

  • @andromilk2634
    @andromilk2634 5 หลายเดือนก่อน

    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"?

  • @vladimirshnyakin4334
    @vladimirshnyakin4334 2 ปีที่แล้ว

    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?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว

      I would need to go back and review to give you a specific fix, but in general, you are correct that z-index will impact what is on top. Apply a larger number value to whatever you want on top.

  • @stanislavaksenov1700
    @stanislavaksenov1700 ปีที่แล้ว

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

  • @morningstar330
    @morningstar330 2 ปีที่แล้ว

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

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว

      I want to do this in the future, and thank you for the request! 🙏🚀

  • @multihyphsa5355
    @multihyphsa5355 ปีที่แล้ว

    🎉

  • @9nikolov
    @9nikolov 11 หลายเดือนก่อน

    400th like 😀