I want to implement the following animation using CSS in the center of the screen:
- the text "Hello" fades in
- the text "Hello" fades out
- the small circle appears and changes to the bigger rectangle
I implemented the 3rd step as follows:
.step3 {
height: 250px;
width: 250px;
margin: 0 auto;
background-color: blue;
animation-name: stretch;
animation-duration: 10s;
animation-timing-function: ease-out;
animation-delay: 0;
animation-direction: alternate;
animation-iteration-count: 1;
animation-fill-mode: none;
animation-play-state: running;
}
@keyframes stretch {
0% {
transform: scale(.3);
border-radius: 100%;
}
100% {
transform: scale(1.5);
}
}
<div class="step3"></div>
I was reading about animate.css that can be used to fade in and out the text:
<div class="animated fadeIn 1">Hello</div>
But how can I fade this text out sequentially? And how can I put all 3 steps into a sequence?