<div class="element">要素</div>  
.element {
  margin: 40px 40px;
  width: 100px;
  height: 100px;
  background: #000;
  color: #fff;
}
const tl = gsap.timeline({repeat: -1, repeatDelay: 1});
tl.to(".element",{
  x: 100,
  duration: 1
});
tl.to(".element", {
  y: 100,
  duration: 1,
});
tl.to(".element", {
  x: 0,
  duration: 1,
  rotation: 360
});
tl.to(".element", {
  y: 0,
  duration: 1,
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://unpkg.co/gsap@3/dist/gsap.min.js