aos
aos copied to clipboard
Couldn't make data-aos-offset worked
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
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.
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.
Same issue. I can change to any number and it does not change.
v-2.3.4 got same issue.