<div class="box green">no delay</div>
<div class="box purple">delay: 1</div>
<div class="box orange">delay: 2</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;
display: flex;
align-items: center;
justify-content: center;
}
gsap.to(".green", {
rotation: 360,
duration: 1,
});
gsap.to(".purple", {
rotation: 360,
duration: 1,
delay: 1,
});
gsap.to(".orange", {
rotation: 360,
duration: 1,
delay: 2,
});