Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<script src="https://rawgit.com/web-animations/web-animations-js/master/web-animations.min.js"></script>
<div id="element"></div>
 
#element {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: blue;
}
 
// Property indexed keyframes syntax
// ---------------------------------
// Each CSS property specifies its keyframe values as a list,
// different properties may have differently sized lists.
// The easing property applies its timing function to all keyframes.
element.animate({
  transform: [
    'scaleY(0.5)',
    'scaleX(0.5)',
    'scaleY(0.5)',
  ],
  background: [
    'red',
    'blue',
    'orange',
    'red',
  ],
  easing: 'ease-in-out',
}, {
  duration: 2000,
  iterations: Infinity,
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers