Web Code
Login
Sign Up
HTML
Web Designing
1963
Web Development
2056
Brand Building
1756
Responsive Design
1823
CSS
@import url('https://fonts.googleapis.com/css2?family=Alegreya+Sans:ital,wght@0,100;0,300;0,400;0,500;0,700;0,800;0,900;1,100;1,300;1,400;1,500;1,700;1,800;1,900&display=swap'); :root{ --white: #fff; --color1: #20bf6b; --color2: #EEEEEE; } .counter{ color: var(--color1); background: linear-gradient(to bottom, var(--color1) 19%, var(--color2) 19%,var(--color2) 84%,var(--color1) 0%); font-family: 'Alegreya Sans', sans-serif; text-align: center; width: 210px; height: 210px; border-radius: 100px 100px; padding: 46px 10px; margin: 50px auto 0; position: relative; z-index: 1; } .counter:before, .counter:after{ content:""; width: calc(100% - 15px); height: calc(100% - 15px); border-radius: 100px 100px; border: 3px solid var(--color1); transform: translateX(-50%) translateY(-50%); position: absolute; top: 50%; left: 50%; z-index: -1; } .counter:after{ background: var(--white); width: calc(100% - 35px); height: calc(100% - 35px); border: none; box-shadow: 0 0 10px rgba(0,0,0,0.5); } .counter .counter-icon{ font-size: 30px; line-height: 30px; margin: 0 0 15px; } .counter .counter-icon i {line-height:inherit;} .counter h3{ font-size: 20px; font-weight: 700; text-transform: capitalize; margin: 0 0 10px; } .counter .counter-value{ font-size: 33px; font-weight: 600; line-height: 33px; display: block; } .counter.orange{ --color1: #EC721F; } .counter.pink{ --color1: #f368e0; } .counter.purple{ --color1: #8854d0; } @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