UNPKG

zwip

Version:

Utility for creating JS animations on top of W3C [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) function.

36 lines (33 loc) 605 B
<html> <head> <title>Zwip : Simple animation example</title> <style> .circle { position: absolute; background-color: #6495ed; border-radius: 50%; width: 200px; height: 200px; } #circle > * { flex: 1; } .loop-state, .animation-state { position: absolute; bottom: 0; } .animation-state { left: 0; } .loop-state { right: 0; } </style> </head> <body> <h1>Simple animation example</h1> <button id="pause">pause</button> <button id="reset">reset</button> <button id="stop">stop</button> </body> </html>