Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 1.11 KB

README.md

File metadata and controls

38 lines (29 loc) · 1.11 KB

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();