Jump to content
Search Community

New To Greensock: Replication this css animation

bucedup test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello All! Fairly new to Greensock and can't seem to find what I'm looking for after some google searching. I'd like to replicate this same css animation using TweenLite. What would be the equivalent of this css animation using greensock? Still trying to wrap my head around everything.

 

.container {
	animation-duration: .75s;
	animation-fill-mode: both;
	animation-name: slideInUp;
}

@keyframes slideInUp {
    from {
    	opacity: 0;
        transform: translate3d(0, 10px, 0);
    }

    to {
    	opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

 

Link to comment
Share on other sites

Hi @bucedup :)

 

Welcome to the forum.

 

A from() tween would be the simplest way to accomplish the same thing.

TweenLite.from(".container",  0.75, {y:10, opacity:0});

 

or you could use a fromTo() tween:

TweenLite.fromTo(".container",  0.75, {y:10, opacity:0}, {y:0, opacity:1});

 

If you're just getting started, I'd recommend:

https://greensock.com/get-started-js

https://greensock.com/jump-start-js

 

Hopefully that helps.

 

Happy tweening and welcome aboard.

:)

  • Like 3
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...