JSFiddle - React, Tailwind, and code Playground
HTML
<div style="width: 500px; height: 200px; background-color: green; margin: 50px 0 0 50px;">
<!--<div style="background-color: red; width: 100px; height: 100px; position: relative; left: 60px; top: 100px;"></div>-->
<div class="element-animation">.</div>
<!--<div style="background-color: silver; width: 100px; height: 100px;"></div>-->
</div>
CSS
.element-animation{
background-color: yellow;
width: 30px;
height: 30px;
animation: animationFrames linear 0.7s;
animation-iteration-count: 1;
transform-origin: ;
-webkit-animation: animationFrames linear 0.7s;
-webkit-animation-iteration-count: 1;
-webkit-transform-origin: ;
}
@keyframes animationFrames{
0% {
left:0px;
top:0px;
opacity:0;
transform: rotate(-200deg) scaleX(1) scaleY(1) ;
}
100% {
left:0px;
top:0px;
opacity:1;
transform: rotate(0deg) scaleX(1) scaleY(1) ;
}
}
@-webkit-keyframes animationFrames {
0% {
left:0px;
top:0px;
opacity:0;
-webkit-transform: rotate(-200deg) scaleX(1) scaleY(1) ;
}
100% {
left:0px;
top:0px;
opacity:1;
-webkit-transform: rotate(0deg) scaleX(1) scaleY(1) ;
}
}