0.0.2 • Published 7 years ago

css-keyframes-animation v0.0.2

Weekly downloads
16
License
MIT
Repository
github
Last release
7 years ago

css-keyframes-animation

Travis build status Test Coverage Dependency Status devDependency Status

Generate @keyframes rule specifies the animation code

If you want to generate CSS keyframes animation, like so:

@keyframes myAnimation {
  0% {
    transform: translateX(0)
  }
  100% {
    transform: translateX(100px)
  }
}

You have to do this:

  const animation = new CssKeyframesAnimation({
    0: {
      transform: translateX(0)   
    },
    100: {
      transform: translateX(100px)
    }
  }, 'myAnimation');
  
  animation.generateKeyframesAnimation();