JSFiddle - React, Tailwind, and code Playground
by Keith Jeter
HTML
<div class="col-xs-12 bc_samp_wrap">
<div class="bc_full_ring_wrap">
<div class="bc_ring_container">
<div class="ringring"></div>
<div class="circle bc_animated bc_pulse">
<span id="value" class="nu_numb">5</span>
<span class="sub_numb">MI</span>
</div>
</div>
</div>
<div class="bc_p_wrap">
<p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</div>
CSS
body {
font-family: 'Roboto', sans-serif;
}
.bc_samp_wrap {
display: flex;
background: #ffffff;
flex-direction: row;
justify-content: flex-start;
border: solid 1px #ddd;
padding: 15px;
margin-bottom: 15px;
-webkit-box-shadow: 0 1px 1px rgb(0 0 0 / 5%);
box-shadow: 0 1px 1px rgb(0 0 0 / 5%);
padding-top: 15px;
padding-bottom: 15px;
padding-left: -15px;
padding-right: -15px;
}
.bc_p_wrap {
width: calc(100% - 100px);
}
.bc_full_ring_wrap {
position: relative;
float: left;
display: block;
overflow: hidden;
width: 100px;
height: 100px;
}
.bc_ring_container {
position: relative;
margin-top: 10px;
display: block;
overflow: hidden;
width: 80px;
height: 80px;
}
.circle {
width: 40px;
height: 40px;
background-color: #064c7b;
border-radius: 50%;
margin-top: 24px;
margin-left: 24px;
flex: center;
display: flex;
align-items: center;
justify-content: center;
}
.ringring {
border: 3px solid #428bca;
-webkit-border-radius: 30px;
height: 50px;
width: 50px;
position: absolute;
left: 16px;
top: 16px;
-webkit-animation: pulsate 1.25s ease-out;
-webkit-animation-iteration-count: infinite;
opacity: 0;
}
.nu_numb {
color: #fff;
position: absolute;
top: 42%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 18px;
font-weight: bold;
}
.sub_numb {
color: #fff;
font-size: 7px;
font-weight: bold;
margin-top: 18px;
}
/* .cent_txt {
color: #064c7b;
font-size: 16px;
font-weight: bold;
text-align: center;
margin-top: -10px;
} */
@-webkit-keyframes pulsate {
0% { -webkit-transform: scale(0.1, 0.1); opacity: 0; }
50% { opacity: 1; }
100% { -webkit-transform: scale(1.2, 1.2); opacity: 0; }
}
/*-- pulse animation --*/
.bc_animated {
animation-duration: 2.5s;
animation-fill-mode: both;
animation-iteration-count: infinite;
}
@keyframes pulse {
0% { -webkit-transform: scale(0.1, 0.1); }
100% { -webkit-transform:...
JavaScript
var counter = 5;
const obj = document.getElementById("value");
var interval = setInterval(function() {
if (counter <= 150) {
obj.innerHTML = counter;
counter = counter + 5;
}
else {
clearInterval(interval);
}
}, 300);