MDN self-hosted library · e01.org

CSSAnimation: animationName property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

css
.animate {
  animation: slide-in 0.7s both;
}

@keyframes slide-in {
  0% {
    transform: translateY(-1000px);
  }
  100% {
    transform: translateY(0);
  }
}
js
let animations = document.querySelector(".animate").getAnimations();
console.log(animations[0].animationName);