JSFiddle - React, Tailwind, and code Playground

by andika saputra

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenLite.min.js"></script>
<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/TweenMax.min.js"></script>
<div id="demo">
	<div id="bar"></div>
		<div id="logo"><img src="http://www.clker.com/cliparts/c/s/Y/a/B/q/roketship-red-white-blue-and-grey-hi.png" width="60"></div>
	</div>

CSS

body{
    background-color:#000;
}
#demo {
    width: 692px;
    height: 70px;
    background-color: #333;
    padding: 8px;
}
#bar{
    background-color:#91e500; 
    color:black; 
    position:relative; 
    width:60px; 
    height:10px;
    }
#logo {
    position: relative;
}

JavaScript

window.onload = function() {
    var logo = document.getElementById("logo"),
        bar = document.getElementById("bar");
     
    TweenLite.to(bar, 2, {width:"692px"});
    TweenLite.to(logo, 2, {left:"632px", delay:1});
}