Jump to content


Text scrolling on window resize

Recommended Posts

I have a marquee animation on a text that works fine on page load. But when you adjust the browser window, the dimensions are not correct. Is it possible to update the x-axis with the correct variable on window resize and not run the whole function over again?

See the Pen LBYzzz by helleholmsen (@helleholmsen) on CodePen

Link to comment
Share on other sites


As far as I know GSAP applies fixed value (eg. 1000), even tho if you apply for example 100vh value, which should scale nicely. I believe it's done due to better performance, but having an option to animate keeping responsivity would be nice. There's always this moment at the end when I have to bind tweens on window resize to keep things responsive.

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.