How to get free YouTube subscribers, likes and views?
Get Free YouTube Subscribers, Views and Likes

Before and After pseudo elements explained - part one: how they work

Follow
Kevin Powell

The before and after pseudo elements are super useful part of CSS, but are often misunderstood. This is part of a threepart series where I look at how they work, and cool stuff we can do with them.

In this video, I focus on what ::before and ::after even are and how we can use them, and even why we use the double colon before them, instead of a single one (it's to distinguish them from pseudoclasses, like :hover).

One important thing with both the before and after pseudo elements is that they require us to define the content property. Without it, it defaults to none and, well, we can use it!



New to Sass, or want to step up your game with it? I've got a course just for you: https://www.kevinpowell.co/learnsass



My Code Editor: VS Code https://code.visualstudio.com/

How my browser refreshes when I save:    • How to automatically refresh your bro...  



Support me on Patreon:   / kevinpowell  

I'm on some other places on the internet too!

If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter.

Instagram:   / kevinpowell.co  
Twitter:   / kevinjpowell  
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevinpowell

posted by verovivan5