JSFiddle - React, Tailwind, and code Playground
CSS
.circle {
width: 300px;
height: 300px;
border-radius: 50%;
border: 3px solid #000;
-webkit-transition: all 2s linear;
-webkit-transform: scale(0.1);
position: absolute;
top: 0;
left: 0;
}
.circle.zoom {
opacity: 0;
-webkit-transform: none;
}
JavaScript
counter = 0;
function createCircle(){
// Circle ID
var circleID = "circle_" + counter;
// Add circle to document
$("body").append("<div class='circle' id='" + circleID + "'></div>");
$thisCircle = $("#" + circleID);
// add "zoom" class
setTimeout(function(){
$thisCircle.addClass("zoom");
},10);
// Remove circle
setTimeout(function(){
$thisCircle.remove();
},3000);
counter++;
}
setInterval(function(){
createCircle();
},500);