reinaldohrm
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by reinaldohrm
-
-
So, i'm learning gsap for about three days and i'm facing a "problem" that can be something that i just don't know that works that way but is making me a little bit confused.
In the code below, i have two example where, the first one when i try to animate a text inside of a pinned container using the property
start
with the value"top top"
and the trigger being the pinned container, not the text, it works pretty well as i expected, the text animates when the top of the viewport hits the top of my pinned container.But, at the second example, i tried to use a relative value at
start
property which was"10% top"
, but the animation actually only started after (probably 10% after) the pin ends and not after the 10% of the top of the pinned container like i was expecting.I tried to use values like
"+=500 top"
or"500px top"
and it "did'nt" works too.Is that a normal behavior or i'm just missing something?
And if is is a normal behavior, how can i can achieve what i was expecting?
See the Pen oNMEEVr by reinaldorm (@reinaldorm) on CodePen
Using relative values in start property at pinned container
in GSAP
Posted
@Cassie That was very enlightening, it makes sense for me now, thanks.