<div class="box red"></div>
<div class="box green"></div>
<div class="box blue"></div>
.box{
  width: 60px;
  height: 60px;
  background: #ff2626;
  border-radius: 4px;
  margin: 10px;
}
.green{
  background: #77ff77;
}
.blue{
  background: #2222ff;
}
gsap.to(".red", {rotation: 27, x: 100, duration: 1});
gsap.from(".green", 
          {rotation: 27, 
           x: 100, 
           duration: 1
          });
gsap.fromTo(".blue", {x: 50, opacity: 0}, {xPercent: -50,opacity: 0.5, 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