JSFiddle - React, Tailwind, and code Playground
by vikaskbh
HTML
<div class="box animate_position">
Position Demo
</div>
CSS
.animate_position{
position:relative;
transition-property:left;
transition-duration:0.4s;
top: 0;
left:0;
}
.animate_position:hover{
left: 100px;
}
/*** following is just box styling ***/
.box {
height: 50px;
width: 200px;
padding: 5px;
border-radius:10px;
margin: 10px;
cursor:pointer;
border:2px solid #0079FF;
letter-spacing: -0.5;
font: 20px/50px 'PT Sans', sans-serif;
text-align: center;
background-color: #0079FF;
color:#fff;
-webkit-box-shadow: 1px 1px 2px #aaa, 1px 1px 1px #6cf inset;
box-shadow: 1px 1px 2px #aaa, 1px 1px 1px #6cf inset;
}