The output I'm getting is the box should move from left to right as per the code but it is not doing so.
.parent {
position: relative;
height: 100px;
background-color: rgb(255, 255, 255);
}
.child {
position: absolute;
top: 0;
left: 0;
width: 100px;
height: 100px;
border: 3px solid black;
background-color: chartreuse;
transition-duration: 2s;
transition-property: left;
transition-timing-function: linear;
}
.parent:hover .child {
left: calc(100%-100px);
}
<div class="parent">
<div class="child"></div>
</div>