JSFiddle - React, Tailwind, and code Playground
by c_vilander
HTML
<div class="div1"></div>
<div class="div2"></div>
CSS
body {
padding: 100px;
}
div {
position: absolute;
width: 100px;
height: 100px;
}
.div1 {
background-color: red;
-webkit-animation: divone 2.0s ease-in-out forwards;
-webkit-animation-iteration-count: 1;
-webkit-animation-delay: 1.0s;
}
.div2 {
background-color: green;
-webkit-animation: divtwo 2.0s ease-in-out forwards;
-webkit-animation-iteration-count: 1;
-webkit-animation-delay: 1.0s;
}
@-webkit-keyframes divone
{
0% {-webkit-transform: rotate(0deg);}
50% {-webkit-transform: rotate(30deg);}
100% {-webkit-transform: rotate(30deg) translate(100px,0px);}
}
@-webkit-keyframes divtwo
{
0% {-webkit-transform: rotate(0deg);}
50% {-webkit-transform: rotate(30deg);}
100% {-webkit-transform: rotate(30deg) translate(0px,100px);}
}