Jump to content
Search Community

How do I make animation responsive?

Passionate test
Moderator Tag

Go to solution Solved by ZachSaucier,

Recommended Posts

  • Solution

Hey Passionate and welcome.

 

There are several ways you could set this up. One way is to invalidate your tween and then play it again on resize. Make sure to use a functional value for properties you want to refresh though.

See the Pen bGepQMq?editors=0010 by GreenSock (@GreenSock) on CodePen

 

We highly recommend using CodePen to host demos over W3Schools because CodePen is much easier to customize and for the code. We also recommend using other learning resources over W3Schools because W3Schools at times has incorrect or outdated information.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

11 hours ago, ZachSaucier said:

c

 

11 hours ago, ZachSaucier said:

Hey Passionate and welcome.

 

There are several ways you could set this up. One way is to invalidate your tween and then play it again on resize. Make sure to use a functional value for properties you want to refresh though.

 

 

 

We highly recommend using CodePen to host demos over W3Schools because CodePen is much easier to customize and for the code. We also recommend using other learning resources over W3Schools because W3Schools at times has incorrect or outdated information.

Thanks!

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...