Hi, I will provide a free code for all of you on my YouTube channel, in learn Build Circular Progress Bar Animation Using HTML CSS and Javascript. The learning is very easy, simple and easy to understand for beginners, good luck, good luck, my advice is don't forget to keep learning and repeat until you can, happy coding. have a nice day friend.
this is my post for the previous one, you just have to learn it properly, and I will provide the latest updates about teaching web design quickly and easily
the best way is to always learn and practice directly, don't get hung up on confusing code, if you enter the wrong code, don't panic
This is the code HTML and CSS you need learn :
1. Code HTML :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<title>Loading Animation I Yaya WD</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="animation">
<span class="number" data-value="100"></span>
<svg height="150" width="150" class="circle">
<circle cx="75" cy="75" r="65"
stroke-width="20" fill="none"
stroke="#fff"></circle>
</svg>
</div>
<script src="script.js"></script>
</body>
</html>
2. Code CSS :
* {
padding: 0;
margin: 0;
font-family: 'poppins';
}
body {
background: #181818;
}
div {
margin: 18% auto;
}
.animation {
color: #fff;
font-size: 25px;
width: 150px;
height: 150px;
border-radius: 50%;
outline: 1px solid #fff;
outline-offset: -1px;
position: relative;
}
.animation::after {
content: '';
width: 110px;
height: 110px;
border-radius: inherit;
outline: inherit;
}
.animation::after, .number {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.circle {
stroke-dasharray: 410;
stroke-dashoffset: 410;
transform: rotate(-90deg);
animation: bar-fill 8s linear forwards;
}
@keyframes bar-fill {
100% {
stroke-dashoffset: 0;
}
}
3. Code Javascript
let counter = 0;
setInterval(() => {
const el = document.querySelector('.number');
const elValue = Number(el.getAttribute('data-value'));
if (counter !== elValue) {
counter++;
el.innerHTML = `${counter}%`;
}
}, 80);
For more details, you can click link below :
https://www.youtube.com/watch?v=wsHH_6ItLaU
Support my channel. Comment, like and subscribe, success for all of us, happy world hereafter. Amin, Good Luck. 😀
Download Free Code ZIP : DOWNLOAD NOW
Belum ada tanggapan untuk "Build Circular Progress Bar Animation Using HTML CSS and Javascript"
Post a Comment