Jump to content
Search Community

how to rotate like css trasform

lichunbin814 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 created a flash animation, now I want to add to Html, but I have no idea how to rotate the cover, it always rotate more, does any have some idea? 


1509104513052.gif
 

like as below css 

 

.story-pot-cover{
  animation:  roatePotCover .2s linear infinite alternate;
}

.story-pot-cover-top{
  animation: roatePotCover .2s linear infinite alternate;
}

@keyframes roatePotCover {
  0%{
    transform: translate(4px , -8px) rotate(11deg);
  }    
  40%{
    transform: translate(4px , -6px) rotate(11deg);
  }
  70%{
    transform: translate(3px , 0px) rotate(0deg);
  }
  100%{
    transform: translate(3px , 0px) rotate(0deg);
  }
}

 

 

 

 

See the Pen mqbaPJ by lichunbin814 (@lichunbin814) on CodePen

Link to comment
Share on other sites

  • 2 weeks later...

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