Skrollr: how to start an animation only once when a certain moment is reached?

I play with the skrollr plugin , but I can’t achieve what I want, so I'm looking for help. I was able to implement light effects, such as <div id="intro-left" data-0="opacity: 0" data-180="opacity: 1"> (means that my DIV called intro-left becomes visible when the user scrolls down 180)

The problem is that I do not like to use scrolling, since it only makes sense if everyone had the same screen resolution?

What I need to do is say skrollr: "Change the DIV from opacity 0 to opacity 1 when the DIV position becomes visible on the screen" (in other words "Change the DIV from opacity 0 to opacity 1 as soon as the user reaches a certain point on the page, scrolling down)

Is this possible with skrollr and how?

Many thanks

+4
source share
1 answer

Have you looked at the documentation ?

Even an example showing various anchors

In short:

 <div id="intro-left" data-bottom-top="opacity: 0" data-center="opacity: 1"> 
+7
source

Source: https://habr.com/ru/post/1501141/


All Articles