Jump to content
Search Community

How to update the width when resize screen on timeline with scrollTrigger

Maniak Development test
Moderator Tag

Go to solution Solved by OSUblake,

Recommended Posts

Yes, that's because the parent is display: flex and since you're converting between units (% to px), GSAP uses an invisible element that gets added temporarily (for measurement) but in that context a width: 100% isn't actually 100% due to the way the browser splits the spacing up in display: flex. I've added a workaround to the next release which you can preview at: https://assets.codepen.io/16327/gsap-latest-beta.min.js 

 

Better?


In the meantime, Blake's suggestion is great. 

  • Like 2
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...