MENU
Timing Animation
RESETRUNFULL
<!DOCTYPE html><html><head></head><body><div>No, you can't just multiply strings. 'Python goes b' + 'r'*10.</div><script>const element = document.querySelector('div'); let start;function step(timestamp) {
if (!start) start = timestamp;
const elapsed =timestamp - start;
element.style.transform =
'rotateZ(' + Math.min(-0.05 * elapsed, 200) + 'deg)';
if (elapsed < 2000) requestAnimationFrame(step);}const id = requestAnimationFrame(step);//cancelAnimationFrame(id);</script></body></html>