aos icon indicating copy to clipboard operation
aos copied to clipboard

Couldn't make data-aos-offset worked

Open nmenescardi opened this issue 6 years ago • 4 comments

I couldn't make the parameter “data-aos-offset” worked with “fade up” animation. I used it like this:

<p data-aos="fade-up" data-aos-delay="300" data-aos-offset="70">TEXT</p>

It is the way to be used?

As a workaround, I used the following sass code to add several offset styles to have at hand later to use:

@for $i from 1 through 200 {
    $x: "\"#{$i}\""; & #{
        "[data-aos=fade-up][data-aos-offset=" + $x + "]"
    } {
        transform: translate3d(0, 0px + $i, 0);
    }
}

After that, having the following code solved the issue:

[data-aos=fade-up][data-aos-offset="70"] {
    -webkit-transform: translate3d(0,70px,0);
    transform: translate3d(0,70px,0);
}

This is:

  • Question

Specifications

  • AOS version: 2.0
  • OS: Linux, Windows
  • Browser: Chrome, Firefox

nmenescardi avatar Oct 10 '18 14:10 nmenescardi

Is there any reason why you are using v2.0? v2.3.4 works fine 👍 Or show me more of your code, I will try to help.

m-kutnik avatar Oct 12 '18 09:10 m-kutnik

Could not make it work either. Using v2.3.4 Even if I set it on the AOS.init({offset: 40}). Don't have time to create a dummy app to reproduce it ATM.

a-barbieri avatar Dec 18 '19 16:12 a-barbieri

Same issue. I can change to any number and it does not change.

CalebAmesbury avatar Jul 22 '20 02:07 CalebAmesbury

v-2.3.4 got same issue.

mustkem avatar Mar 30 '22 12:03 mustkem