From the course: CSS: Scrolling and Parallax

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Pseudo classes and elements

Pseudo classes and elements - CSS Tutorial

From the course: CSS: Scrolling and Parallax

Pseudo classes and elements

- [Instructor] To show you how positioning works, I'm going to build some styles using a special category of classes called Pseudo Classes. Pseudo classes let you define how an element looks when it's in a certain state. The one that we're interested in is the :hover state. That means when a user places the mouse over some element, but there are literally dozens of pseudo elements. This is what they look like. You specify a selector, and then use a Colon with the name of the pseudo class that you're targeting. And then you can modify any of the properties and values for that element. In addition to that, we'll use something called Pseudo Elements. Now, pseudo elements let you take an element and modify certain parts of that element, or in our case, create new elements related to the originals. The pseudo elements that we're interested in are called ::before, which lets you create an element before our selected…

Contents