<div class="box green"></div>
<div class="box purple"></div>
/* Global styles come from external css https://codepen.io/GreenSock/pen/gOWxmWG */

body {
  display: flex;
  align-items: center;
  justify-content: space-around;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
}

.box {
  display: block;
}
gsap.to(".green", { 
  rotation: 360,
  duration: 1,
  repeat: 1,
  repeatDelay: 1,
});


gsap.to(".purple", { 
  rotation: 360,
  duration: 1,
  delay: 1 // delay the start of this animation
});

External CSS

  1. https://codepen.io/GreenSock/pen/gOWxmWG.css

External JavaScript

  1. https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/gsap-latest-beta.min.js