Web Code
Login
Sign Up
HTML
Web Designing
1963
Web Development
1854
Brand Building
1756
Responsive Design
1823
CSS
@import url('https://fonts.googleapis.com/css2?family=Dosis:wght@200..800&display=swap'); :root{ --main-color: #B33771; } .counter{ color: var(--main-color); font-family: 'Dosis', sans-serif; text-align: center; width: 210px; height: 210px; padding: 80px 15px 20px; margin: 50px auto 0; border-radius: 50%; position: relative; z-index: 1; box-shadow: 0 0 20px -5px var(--main-color); } .counter:before{ content: ''; border-radius: inherit; border: 3px solid var(--main-color); position: absolute; top: 8px; left: 8px; right: 8px; bottom: 8px; z-index: -1; } .counter .counter-icon{ color: #fff; background: var(--main-color); font-size: 30px; line-height: 60px; width: 60px; height: 60px; margin: 0 0 15px; border-radius: 50%; position: absolute; left: 0; top: 0; } .counter .counter-icon i{ line-height:inherit; } .counter h3{ font-size: 18px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; margin: 0 0 12px; } .counter .counter-value{ font-size: 30px; font-weight: 600; display: block; } .counter.blue{ --main-color: #1B9CFC; } .counter.purple{ --main-color: #3B3B98; } .counter.pink{ --main-color: #FC427B; } @media screen and (max-width:990px){ .counter{ margin-bottom: 40px; } }
JS
window.onload = function(){ $('.counter-value').each(function(){ $(this).prop('Counter',0).animate({ Counter: $(this).text() },{ duration: 3500, easing: 'swing', step: function (now){ $(this).text(Math.ceil(now)); } }); }); }
Output