JSFiddle - React, Tailwind, and code Playground
HTML
<div class="pulse green"></div>
<div class="pulse yellow"></div>
<div class="pulse red"></div>
CSS
html {
background-color: #232323;
}
.pulse {
margin: 30px;
width: 10px;
height: 10px;
background-color: #749a02;
border-radius: 5px;
}
@-webkit-keyframes fadeInOut {
from { opacity: 0.0; }
25% { opacity: 1.0; }
75% { opacity: 1.0; }
to { opacity: 0.0; }
}
@-webkit-keyframes greenPulse {
from {
background-color: #749a02;
-webkit-box-shadow: 0 0 9px #333;
}
50% {
background-color: #91bd09;
-webkit-box-shadow: 0 0 18px #91bd09;
}
to {
background-color: #749a02;
-webkit-box-shadow: 0 0 9px #333;
}
}
div.pulse.green {
-webkit-animation: greenPulse 2s infinite, fadeInOut 4s 1;
}
@-webkit-keyframes yellowPulse {
from {
background-color: #fc9200;
-webkit-box-shadow: 0 0 9px #333;
}
50% {
background-color: #ffb515;
-webkit-box-shadow: 0 0 18px #ffb515;
}
to {
background-color: #fc9200;
-webkit-box-shadow: 0 0 9px #333;
}
}
div.pulse.yellow {
-webkit-animation: yellowPulse 2s infinite, fadeInOut 4s 1;
}
@-webkit-keyframes redPulse {
from {
background-color: #bc330d;
-webkit-box-shadow: 0 0 9px #333;
}
50% {
background-color: #e33100;
-webkit-box-shadow: 0 0 18px #e33100;
}
to {
background-color: #bc330d;
-webkit-box-shadow: 0 0 9px #333;
}
}
div.pulse.red {
-webkit-animation: redPulse 2s infinite, fadeInOut 4s 1;
}