michalsnik / aos

Animate on scroll library
MIT License
26.6k stars 2.57k forks source link

Fade transitions all showing at once instead of as you scroll down the page #692

Open mikecalland opened 3 years ago

mikecalland commented 3 years ago

I have added the following code to <div's> on the page. I have used this because its the only setting that allows all sections to show. Not sure why. Anyway, when I load the page, the transitions all fire at once instead of as your scroll down the page. Is there a way to make them fire as they come into the viewport?:

data-aos="fade-up" data-aos-anchor=".other-element"

Specifications

Expected Behaviour

When I scroll down, elements fly in as I scroll.

Actual Behaviour

all elements fire at once

Steps to Reproduce the Problem

https://codepen.io/mikevticivic/pen/ZEKEvoK

laneparton commented 3 years ago

@mikecalland It might be because you used the default code <div data-aos="fade-up" data-aos-anchor=".other-element"></div>

You might try removing the data-aos-anchor=".other-element" that is discussed in the readme.

chongkai96 commented 2 years ago

https://github.com/michalsnik/aos/issues/402#issuecomment-574464746