Skip to content

web-animations/web-animations-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4806309 · Jun 25, 2019
Jun 13, 2018
Jun 13, 2018
Nov 11, 2014
Jun 24, 2019
Jun 26, 2014
Jun 25, 2019
May 5, 2016
Jun 24, 2019
Jun 25, 2019
Jun 24, 2019
Jul 21, 2017
Jun 5, 2014
Jun 24, 2019
Jun 25, 2019
Jun 13, 2018
Nov 11, 2016
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Feb 19, 2015
Mar 18, 2016
Nov 13, 2014
Nov 11, 2016
Mar 18, 2016
Nov 13, 2014
Nov 11, 2016
Mar 18, 2016
Nov 13, 2014
Dec 1, 2014
Nov 11, 2016

Repository files navigation

What is Web Animations?

A new JavaScript API for driving animated content on the web. By unifying the animation features of SVG and CSS, Web Animations unlocks features previously only usable declaratively, and exposes powerful, high-performance animation capabilities to developers.

What is in this repository?

A JavaScript implementation of the Web Animations API that provides Web Animation features in browsers that do not support it natively. The polyfill falls back to the native implementation when one is available.

Quick start

Here's a simple example of an animation that fades and scales a <div>.
Try it as a live demo.

<!-- Include the polyfill -->
<script src="web-animations.min.js"></script>

<!-- Set up a target to animate -->
<div class="pulse" style="width: 150px;">Hello world!</div>

<!-- Animate! -->
<script>
    var elem = document.querySelector('.pulse');
    var animation = elem.animate({
        opacity: [0.5, 1],
        transform: ['scale(0.5)', 'scale(1)'],
    }, {
        direction: 'alternate',
        duration: 500,
        iterations: Infinity,
    });
</script>

Documentation

We love feedback!

Keep up-to-date

Breaking polyfill changes will be announced on this low-volume mailing list: web-animations-changes@googlegroups.com.

More info