Animated counter element

Developer
Size
3,412 Kb
Views
12,144

How do I make an animated counter element?

What is a animated counter element? How do you make a animated counter element? This script and codes were developed by Jelmer on 02 December 2022, Friday.

Animated counter element Previews

Animated counter element - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Animated counter element</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="counter-block cf"> <div class="counter-text"> <div class="counter-ruler"></div> <strong> <span class="counter-number"><i>1</i><i>2</i>3</span> <span class="counter-number"><i>1</i>2</span> <span>.</span> <span class="counter-number"><i>1</i> <i>2</i> <i>3</i> <i>4</i>5</span> </strong> <em>Mln</em> </div>
</div>
</body>
</html>

Animated counter element - Script Codes CSS Codes

body { padding: 50px;
}
.content-counter h3 { font-size: emCalc(44); line-height: 1.2; word-wrap: break-word; text-align: right; margin-top: 0; margin-bottom: emCalc(5); padding-bottom: emCalc(5); border-bottom: 2px solid #09F; overflow: hidden;
}
.counter-block { color: white; font: normal normal 100 80px/1 Helvetica, sans-serif; background: #09F; position: relative;
}
.counter-block strong,
.counter-block em { font-weight: 100; font-style: normal; display: inline-block;
}
.counter-block em { letter-spacing: 5px; font-size: 50px;
}
.counter-block span { padding: 30px 10px 40px 10px; display: inline-block;
}
.counter-block .counter-text { float: right; padding-right: 20px; position: relative; text-shadow: 1px 1px rgba(0, 0, 0, 0.1);
}
.counter-block .counter-text .counter-ruler { position: absolute; top: 0; right: 105%; bottom: 0; width: 15%; background-color: #09F; background-image: -webkit-linear-gradient(white 0, white 2%, transparent 2%), -webkit-linear-gradient(left, transparent 70%, #09F 70%), -webkit-linear-gradient(transparent 20%, white 20%, white 21%, transparent 21%, transparent 40%, white 40%, white 41%, transparent 41%, transparent 60%, white 60%, white 61%, transparent 61%, transparent 80%, white 80%, white 81%, transparent 81%); background-image: linear-gradient(white 0, white 2%, transparent 2%), linear-gradient(90deg, transparent 70%, #09F 70%), linear-gradient(transparent 20%, white 20%, white 21%, transparent 21%, transparent 40%, white 40%, white 41%, transparent 41%, transparent 60%, white 60%, white 61%, transparent 61%, transparent 80%, white 80%, white 81%, transparent 81%); background-size: 100% 100px; background-repeat: repeat-y;
}
.counter-block:before { content: ""; display: block; position: absolute; top: 50%; right: 100%; height: 0; width: 0; border-top: 12px solid transparent; border-bottom: 12px solid transparent; border-right: 12px solid #09F; margin-top: -12px;
}
@-webkit-keyframes countdown { from { -webkit-transform: translateY(300%); transform: translateY(300%); } to { -webkit-transform: translateY(0); transform: translateY(0); }
}
@keyframes countdown { from { -webkit-transform: translateY(300%); transform: translateY(300%); } to { -webkit-transform: translateY(0); transform: translateY(0); }
}
.counter-number { position: relative; -webkit-transform: translate3d(0, 300%, 0); transform: translate3d(0, 300%, 0); -webkit-animation: countdown 1s forwards; animation: countdown 1s forwards;
}
.counter-number:nth-of-type(1) { -webkit-animation-delay: 0.1s; animation-delay: 0.1s;
}
.counter-number:nth-of-type(2) { -webkit-animation-delay: 0.2s; animation-delay: 0.2s;
}
.counter-number:nth-of-type(3) { -webkit-animation-delay: 0.3s; animation-delay: 0.3s;
}
.counter-number i { position: absolute;
}
.counter-number i:nth-child(1) { top: -100%;
}
.counter-number i:nth-child(2) { top: -200%;
}
.counter-number i:nth-child(3) { top: -300%;
}
.counter-number i:nth-child(4) { top: -400%;
}
.counter-number i:nth-child(5) { top: -500%;
}
.counter-number i:nth-child(6) { top: -600%;
}
.counter-number i:nth-child(7) { top: -700%;
}
.counter-number i:nth-child(8) { top: -800%;
}
.counter-number i:nth-child(9) { top: -900%;
}
.cf:before,
.cf:after { content: " "; /* 1 */ display: table; /* 2 */
}
.cf:after { clear: both;
}
.cf { *zoom: 1;
}
Animated counter element - Script Codes
Animated counter element - Script Codes
Home Page Home
Developer Jelmer
Username jelmerdemaat
Uploaded December 02, 2022
Rating 3
Size 3,412 Kb
Views 12,144
Do you need developer help for Animated counter element?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Jelmer (jelmerdemaat) Script Codes
Create amazing video scripts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!