Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Apply User Action Pseudo-Classes | Getting Started with CSS
CSS Fundamentals
course content

Kursinnhold

CSS Fundamentals

CSS Fundamentals

1. Getting Started with CSS
2. Styling Text in CSS
3. The CSS Box Model & Spacing Elements
4. Mastering Flexbox for Layouts
5. Adding Decorative Effects with CSS

book
Challenge: Apply User Action Pseudo-Classes

Task

We have a company website with contact information in the header section. Your task is to implement a color change when a user hovers over the links in the header section.

Steps:

  1. Select all a elements with the header-link class.

  2. Use the appropriate pseudo-class for the hover effect.

  3. Apply the color property with the value blue when the links are hovered.

html

index.html

css

index.css

copy
  • Use the . and the class name to select an element by its class name.

  • Use the :hover pseudo-class to react on mouse cursor hover.

html

index.html

css

index.css

copy

Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 7

Spør AI

expand
ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

course content

Kursinnhold

CSS Fundamentals

CSS Fundamentals

1. Getting Started with CSS
2. Styling Text in CSS
3. The CSS Box Model & Spacing Elements
4. Mastering Flexbox for Layouts
5. Adding Decorative Effects with CSS

book
Challenge: Apply User Action Pseudo-Classes

Task

We have a company website with contact information in the header section. Your task is to implement a color change when a user hovers over the links in the header section.

Steps:

  1. Select all a elements with the header-link class.

  2. Use the appropriate pseudo-class for the hover effect.

  3. Apply the color property with the value blue when the links are hovered.

html

index.html

css

index.css

copy
  • Use the . and the class name to select an element by its class name.

  • Use the :hover pseudo-class to react on mouse cursor hover.

html

index.html

css

index.css

copy

Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 7
Vi beklager at noe gikk galt. Hva skjedde?
some-alt