Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Ginger Soul

When exactly do 'from' tweens set their CSS property values? On doc.ready?

Recommended Posts

Hey, wasn't able to find this in the docs. Let's say you want to animate something that's above the fold from zero opacity when the page loads (without using CSS to set the element's initial opacity to zero), but you don't want this scenario with the 'from' tween:

 

1. You see the element briefly (a 'flash of un-set content,' if you will),

2. the 'from' tween gets evaluated and 'sets' the opacity to zero,

3. the tween executes and animates the element 'back' to 1.

I'd like to 'hide the entire layout' with a body opacity=0 while a series of 'from' tweens are setting up their values, but I'm not sure when to, uh, lift that curtain (aka transition the body opacity to 1) and allow the tweens to do their animating. 

Hope this makes sense. Thanks for any insights :)

 

DB

 

 

 

Link to comment
Share on other sites

Perfect, thanks - the answer is to add the CSS to set things up. Appreciate the speedy response!

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