JSFiddle - React, Tailwind, and code Playground
by anmol sandal
HTML
<div class="pulse-outer">
<div class="pulse"></div>
<div class="inner-ball"></div>
<div class="inner-ball1"></div>
</div>
CSS
.pulse-outer
{
position:relative;
width: 200px;
height: 200px;
}
.pulse {
width: 30px;
height: 30px;
border-radius: 100%;
background:#ccc;
position :absolute;
left: 0;
right: 0;
top: 50%;
margin: -15px auto 0;
-webkit-animation: mymove 2s infinite; /* Safari 4.0 - 8.0 */
animation: mymove 2s infinite;
transition: all ease-in-out .2s;
}
.inner-ball {
width: 30px;
height: 30px;
border-radius: 100%;
background:#ccc;
-webkit-animation: mymove1 1.5s infinite; /* Safari 4.0 - 8.0 */
animation: mymove1 2s infinite;
animation-delay: .2s;
position :absolute;
left: 0;
right: 0;
top: 50%;
margin: -15px auto 0;
transition: all ease-in-out .2s;
}
.inner-ball1 {
width: 30px;
height: 30px;
border-radius: 100%;
background:#ccc;
position :absolute;
left: 0;
right: 0;
top: 50%;
margin: -15px auto 0;
transition: all ease-in-out .2s;
z-index:1;
}
/* Safari 4.0 - 8.0 */
@-webkit-keyframes mymove {
0% {opacity: 0; transform: scale(0);}
50% {opacity: 0.5; transform: scale(4.5);}
100% {opacity: 0; transform: scale(4.5);}
}
/* Standard syntax */
@keyframes mymove {
0% {opacity: 0; transform: scale(0);}
50% {opacity: 0.5; transform: scale(4.5);}
100% {opacity: 0; transform: scale(4.5);}
}
@-webkit-keyframes mymove1 {
0% {opacity: 0; transform: scale(0); }
50% {opacity: 0.5; transform: scale(3);}
100% {opacity: 0; transform: scale(3);}
}
/* Standard syntax */
@keyframes mymove1 {
0% {opacity: 0; transform: scale(0);}
50% {opacity: 0.5; transform: scale(3);}
100% {opacity: 0; transform: scale(3);}
}