Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Decorative Pseudo-Elements | Decorative Effects
CSS Fundamentals
course content

Cursusinhoud

CSS Fundamentals

CSS Fundamentals

1. Introduction to CSS
2. Text Styles
3. Box Model and Element Spacing
4. Flexbox
5. Decorative Effects

book
Decorative Pseudo-Elements

Pseudo-elements ::before and ::after are special selectors that allow us to insert content before or after an element's content. We use them to add decorative elements, such as icons or borders, to an element's content without modifying the actual HTML content.

css
  • ::before add the content before the element content;
  • ::after adds the content after the element content.

Let's consider the following example, where our task is to add some decoration for the hover effect on the links:

html

index.html

css

index.css

copy

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 5. Hoofdstuk 4
Onze excuses dat er iets mis is gegaan. Wat is er gebeurd?
some-alt