Web Code
Login
Sign Up
HTML
1963
Web Designing
1854
Web Development
1756
Brand Building
1823
Responsive Design
CSS
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap'); :root{ --color1: #BAF016; --color2: #339F0F; } body{ background-color: #eee; } .counter{ color: #111; font-family: 'Space Grotesk', sans-serif; text-align: center; width: 190px; padding: 0 15px 15px; margin: 50px auto 0; position: relative; z-index: 1; } .counter:before, .counter:after{ content: ''; background-color: #fff; border-radius: 0 0 30px 30px; box-shadow: 0 0 10px rgba(0,0,0,0.2); position: absolute; left: 0; top: 75px; bottom: 0; right: 0; z-index: -1; } .counter:after{ background: linear-gradient(var(--color2),var(--color1)); height: 93px; border-radius: 0 0 150px 150px; bottom: auto; } .counter .counter-value{ color: #fff; background: linear-gradient(var(--color1),var(--color2)); font-size: 35px; font-weight: 700; line-height: 150px; width: 150px; height: 150px; margin: 0 auto 28px; border-radius: 50%; display: block; } .counter h3{ font-size: 16px; font-weight: 600; letter-spacing: 0.5px; line-height: 25px; text-transform: capitalize; margin: 0; } .counter.purple{ --color1: #BA53D7; --color2: #8536AD; } .counter.green{ --color1: #06CFB4; --color2: #00778B; } .counter.red{ --color1: #f32626; --color2: #8b0000; } @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