.SecondParent {
  width: 100px;
  height: 100px;
  background: red;
}
const TheSecondParent = document.createElement("div");
const body = document.querySelector("body");
TheSecondParent.classList.add("SecondParent");
body.append(TheSecondParent);
gsap.from(".SecondParent", { duration: 1, y: "-100%", ease: "bounce" });
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/gsap/3.10.4/gsap.min.js