javascript - How to stagger a sequence of divs in and out with TweenMax StaggerFromTo? -
i have x divs different text. how go using staggerfromto chain 2 different sequences same divs?
- sequence one: animate .text1 on-screen
- sequence two: animate .text1 off-screen while in same movement .text2 animate on-screen
i've had luck sequencing, .text2 first animate on-screen after .text1 (oncomplete) off-screen, whereas i'd looking create feeling of .text2 "pushing out" .text1
codepen shows example of below: https://codepen.io/anon/pen/albbgn
//intro tl_frame.staggerfromto(text, 0.4, { top: "+=50", autoalpha: 0 }, { top: "-=50", autoalpha: 1, ease: power2.easeinout }, 1, 0 ); //outro tl_frame.staggerto(text, 0.4, { top: "-=50", autoalpha: 0 , ease: power2.easeinout }, 1, 0.4 );
Comments
Post a Comment