Jump to content
Search Community

Different duration for different properties of the same element

14136_1494126593 test
Moderator Tag

Recommended Posts

Hi,

 

I assume you mean this particular instance, since I don't see anything else with a scale or opacity animation:

.from(".bg-container img", { scale: 1.2, duration: 10 })

If so super easy, just use the position parameter so both instances start at the same time:

tl
  .from(".bg-container img", { scale: 1.2, duration: 10 })
  .from(".bg-container img", { opacity: 0, duration: 1 }, "<")

In this case the position parameter "<" tells GSAP that the instance should start at the same time as the previous one, regardless of the duration of both.

 

Here is a fork of your demo:

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

 

Hopefully this helps.

Happy Tweening!

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