JSFiddle - React, Tailwind, and code Playground
HTML
<div class="rect"></div>
<div class="line"></div>
CSS
.rect {
position: absolute;
left: 0;
width: 100px;
height: 100px;
background: red;
animation: move 1s;
animation-fill-mode: forwards;
}
.line {
position: absolute;
top: 200px;
left: 100px;
height: 100px;
border-right: 2px solid green;
animation: rotate 1s;
animation-fill-mode: forwards;
animation-delay: 1.3s;
}
@-webkit-keyframes move {
from {
}
to {
left: 200px;
}
}
@-webkit-keyframes rotate {
from {
}
to {
transform: rotate(360deg);
}
}