1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Hide a Menu with GSAP3's set() Tween and autoAlpha Property

    greensockGreenSock

    The gsap.set() tween (or animation container) is a zero-duration tween that instantly applies a property to an HTML element. In addition, there is a subtle but important difference between opacity and Greensock's autoAlpha properties. You will learn how to hide a menu on page load and also how to prevent the element from flashing on page load. This lesson contains Greensock's basic building blocks that are used to create advanced animations with UI elements.

    To add the latest Greensock library to your project, go to Greensock's website. Fun fact: GSAP stands for Greensock Animation Platform, and their current latest version is GSAP 3!

    A common programming convention for Greensock I like to follow is, if you're going to animate a property with Greensock, keep it in Greensock, otherwise, if you are not going to animate a property, keep it in your CSS.