JSFiddle - React, Tailwind, and code Playground

by andikas212

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>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.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

body{
    background-color:#000;
}
#demo {
    width: 692px;
    height: 60px;
    background-color: #333;
    padding: 8px;
}
#logo {
    position: relative;
    width: 60px;
    height: 60px;
    background: url(img/logo_black.jpg) no-repeat;
}
.box {
    position: relative;
    width: 60px;
    height: 60px;
    margin-right: 10px;
    float:left;
}
#red{
    background-color: red;
}
#yellow{
    background-color: yellow;
}
#green{
    background-color: green;
}

JavaScript

window.onload = function() {
    var red = document.getElementById("red"),
        yellow = document.getElementById("yellow"),
        green = document.getElementById("green");
         
    TweenLite.to([red, yellow, green], 3, {scale:0.2, opacity:0.3});
}