JSFiddle - React, Tailwind, and code Playground
by Elok Firdaus
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/latest/plugins/CSSPlugin.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenLite.min.js"></script>
<div id="demo">
<div class="box" id="red"></div>
<div class="box" id="yellow"></div>
<div class="box" id="green"></div>
</div>
CSS
#demo {
width: 692px;
height: 100px;
background-color: #e9f1df;
padding: 8px;
}
#logo {
position: relative;
width: 60px;
height: 60px;
}
.box {
position: relative;
width: 80px;
height: 80px;
margin-right: 10px;
float:left;
}
#red{
background-color: #f2385a;
}
#yellow{
background-color: #f5a503;
}
#green{
background-color: #36b1bf;
}
JavaScript
var red = document.getElementById("red"),
yellow = document.getElementById("yellow"),
green = document.getElementById("green");
TweenLite.to([red, yellow, green], 1, {scale:0.2, opacity:0.3});