Jump to content
Search Community

Trouble with fromTo font size on text on responsive text

bcavs test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

I am trying to create an animation that has text grow on scroll and I have it slightly working right now but have a problem with the responsiveness of the text. The text is smaller on mobile and the animation is working when scrolling down however when I scroll past the end of the animation then back up it reverts the text back to the desktop sizes. I'm pretty new to gsap so probably missing something obvious here but I can't figure out the solution so any help would be appreciated! Thanks!

See the Pen xxWJgQj?editors=0111 by bcavenagh (@bcavenagh) on CodePen

Link to comment
Share on other sites

  • Solution

Not entirely sure what's going on here, but I would go for matchMedia as a solution if I were you.

See the Pen GRoyWBd by GreenSock (@GreenSock) on CodePen

 

That's usually the route to go when you want different results with scrollTriggers on mobile and desktop.

 

We have a release coming soon where you'll be able to do ternery stuff like this though. 👀 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...