JSFiddle - React, Tailwind, and code Playground
by Gegeprima
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>
<div id="demo">
<div id="gambar"><p>
<img id="logo" src="http://www.royanonuevo.com/css/images/character.png">
GreenSock</p>
</div>
</div>
CSS
#demo {
width: 692px;
height: 130px;
background-color: #333;
padding: 8px;
}
#gambar {
position: relative;
width: 150px;
height: 100px;
background: #90E500
color: #000;
font-family: Arial, Helvetica, sans-serif;
border-bottom: solid #000 10px;
}
#logo {
position: relative;
width: 60px;
height: 100px;
}
#logo p {
margin-top: 0px;
margin-left: 50px;
line-height: 60px;
}
JavaScript
var logo = document.getElementById("gambar");
TweenLite.to(gambar, 2, {left:"542px", backgroundColor:"#8caca4", borderBottomColor:"#c73f33", color:"white"});