<div id="demo">
<div id="logo">
<img width="60px" src="https://i.imgur.com/LVZMucD.png"></img>
</div>
</div>
<input type="button" id="restartBtn" value="restart">
#demo {
width: 492px;
height: 60px;
background-color: #F5F5F5;
padding: 8px;
}
#logo {
position: relative;
width: 60px;
height: 60px;
}
input[type="button"]{
appearance: button;
padding:5px;
margin-right:5px;
}
window.onload = function() {
var logo = document.getElementById("logo"),
restartBtn = document.getElementById("restartBtn"),
tween = TweenLite.to(logo, 1, {left:"432px"});
restartBtn.onclick = function() {
tween.restart();
}
}
This Pen doesn't use any external CSS resources.