JSFiddle - React, Tailwind, and code Playground
by Ashish Mishra
HTML
<div id='boy'> </div>
CSS
#boy{
width:200px;
height:220px;
position:absolute;
top:200px;
transition:top 300ms ease-in-out;
background: url('http://www.i2clipart.com/cliparts/b/0/3/b/clipart-a-person-boy-512x512-b03b.png') center no-repeat;
background-size:contain;
}
JavaScript
$(document).keypress(function(e){
if(e.which==32){
$('#boy').css({'top':"0px"});
}
setTimeout(function(){
$('#boy').css({'top':"200px"});
},350);
});