Jump to content
Search Community

webkit-keyframes to GSAP

Arthur Nobrega 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



I have created an image slider using CSS.


@-webkit-keyframes 'slide'{
top: 5px;
51%, 70%{
top: -1080px;
top: -1440px;


I would like to write this using TweenMax, so I can pause, go back, and skip images by hovering the cursor over menu options 





Link to comment
Share on other sites

Hi Arthur and welcome to the GreenSock forums.


I've been dealing with some of this stuff lately and I created a bare-bone sample to build from.


See the Pen CeDkc by rhernando (@rhernando) on CodePen


It has an autoplay feature, pauses on mouse-over only if there is no animation currently happening and you can cilck any of the buttons and go to that specific slide. Like in the pause function the click works only if there's no other slide animating.


The code is insanely commented so you can get a good grasp of how everything works and why is there. The reason is that I'm thinking about building a jQuery plugin with this stuff. Still needs more animations options (is pretty lame as it is right now, especially considering all the options you have with GSAP) and correct the animation of the button background color. Unfortunately I'm needing 36 hour days lately :P, but as soon as I have more free time I'll get to it.



  • Like 2
Link to comment
Share on other sites

Thanks Rodrigo. 


I will give this a try. This is what I am trying to replicate:




I think your example comes pretty close. 


Thanks again,



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