<div class="box box1"></div>
<div class="box box2"></div>
.box {
width: 100px;
height: 100px;
margin: 10px 0;
}
.box1 {
background: royalblue;
}
.box2 {
background: orange;
}
gsap.to('.box1', {
x: 200,
opacity: 0.3,
delay: 0.5,
duration: 1
});
gsap.to('.box2', {
x: 200,
y: 200,
backgroundColor: 'black',
scale: 1.5,
rotate: 360,
duration: 1.5
});
This Pen doesn't use any external CSS resources.