Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Adding AOS to Your Project | Getting Started with AOS
HTML Scroll Animations with AOS

bookAdding AOS to Your Project

To add AOS to your project, start by including the AOS stylesheet in the <head> section of your HTML using a CDN link. This provides all the necessary animation styles. Next, add the AOS JavaScript file just before the closing </body> tag, also via CDN. Initializing AOS with AOS.init(); activates the library and prepares it to animate elements as they scroll into view.

To animate an element, add the data-aos attribute directly to the HTML tag you want to animate. The value of this attribute, such as "fade-up", tells AOS which built-in animation to apply. In the example above, the heading will smoothly fade in and move upward as you scroll to it, demonstrating that AOS is working correctly.

question mark

What is the primary purpose of the data-aos attribute in the HTML example above?

Select the correct answer

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 2

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

bookAdding AOS to Your Project

Stryg for at vise menuen

To add AOS to your project, start by including the AOS stylesheet in the <head> section of your HTML using a CDN link. This provides all the necessary animation styles. Next, add the AOS JavaScript file just before the closing </body> tag, also via CDN. Initializing AOS with AOS.init(); activates the library and prepares it to animate elements as they scroll into view.

To animate an element, add the data-aos attribute directly to the HTML tag you want to animate. The value of this attribute, such as "fade-up", tells AOS which built-in animation to apply. In the example above, the heading will smoothly fade in and move upward as you scroll to it, demonstrating that AOS is working correctly.

question mark

What is the primary purpose of the data-aos attribute in the HTML example above?

Select the correct answer

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 2
some-alt