JSFiddle - React, Tailwind, and code Playground
HTML
<div class="box">
<h1>aparnet.ir</h1>
</div>
CSS
.box {
width: 200px;
height: 200px;
background: #09F;
margin: 0 auto;
text-align: center;
animation-duration: 1s;
animation-name: animate;
animation-iteration-count: 1;
animation-fill-mode: forwards;
-webkit-animation-duration: 1s;
-webkit-animation-name: animate;
-webkit-animation-iteration-count: 1;
-webkit-animation-fill-mode: forwards;
}
.box h1 {
opacity: 0;
line-height: 90px;
color: #FFF;
animation-duration: 3s;
animation-name: animate-text;
animation-iteration-count: 1;
animation-fill-mode: forwards;
animation-delay: 3s;
-webkit-animation-duration: 3s;
-webkit-animation-name: animate-text;
-webkit-animation-iteration-count: 1;
-webkit-animation-fill-mode: forwards;
-webkit-animation-delay: 3s;
}
@keyframes animate {
100% {
width:400px;
background: #E18728;
transform: rotate(720deg);
margin-top: inherit;
}
}
@keyframes animate-text {
100% {
opacity: 1;
}
}
@-webkit-keyframes animate {
100% {
width:400px;
background: #E18728;
-webkit-transform: rotate(3600deg);
margin-top: inherit;
}
}
@-webkit-keyframes animate-text {
100% {
opacity: 1;
}
}