CSS Donut Charts - Animated

Developer
Size
3,502 Kb
Views
10,120

How do I make an css donut charts - animated?

What is a css donut charts - animated? How do you make a css donut charts - animated? This script and codes were developed by Sean Stopnik on 21 December 2022, Wednesday.

CSS Donut Charts - Animated Previews

CSS Donut Charts - Animated - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS Donut Charts - Animated</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="card"> <div class="donut-chart chart1"> <div class="quad one"></div> <div class="quad two"></div> <div class="quad three"></div> <div class="quad four"></div> <div class="quad top"></div> <div class="chart-center"></div> </div><!--/.donut-chart-->
</div>
<div class="card"> <div class="donut-chart chart2"> <div class="quad one"></div> <div class="quad two"></div> <div class="quad three"></div> <div class="quad four"></div> <div class="quad top"></div> <div class="chart-center"></div> </div><!--/.donut-chart-->
</div>
<div class="card"> <div class="donut-chart chart3"> <div class="quad one"></div> <div class="quad two"></div> <div class="quad three"></div> <div class="quad four"></div> <div class="quad top"></div> <div class="chart-center"></div> </div><!--/.donut-chart-->
</div>
<div class="card"> <div class="donut-chart chart4"> <div class="quad one"></div> <div class="quad two"></div> <div class="quad three"></div> <div class="quad four"></div> <div class="quad top"></div> <div class="chart-center"></div> </div><!--/.donut-chart-->
</div>
</body>
</html>

CSS Donut Charts - Animated - Script Codes CSS Codes

* { -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-transform: transform3d(0, 0, 0);
}
body { font-family: sans-serif; background: #e1e1e1;
}
.card { float: left; background: #fff; padding: 20px; margin: 0 20px 0 0;
}
.donut-chart { position: relative; border-radius: 50%; overflow: hidden;
}
.donut-chart .quad { position: absolute; top: 0; left: 0;
}
.donut-chart .chart-center { position: absolute; border-radius: 50%;
}
.donut-chart .chart-center span { display: block; text-align: center;
}
@-webkit-keyframes chart1 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(241.2deg); }
}
@-webkit-keyframes chartRotate2 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(90deg); }
}
@-webkit-keyframes chartRotate3 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(180deg); }
}
@-webkit-keyframes chartRotate4 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(270deg); }
}
@-webkit-keyframes chartCover { 0%, 90% { opacity: 1; } 91%, 100% { opacity: 0; }
}
.donut-chart.chart1 { width: 300px; height: 300px; background: #e1e1e1;
}
.donut-chart.chart1 .quad { width: 150px; height: 150px; top: 0; left: 0; border-radius: 100% 0 0 0; display: none;
}
.donut-chart.chart1 .quad.one { -webkit-transform: rotate(241.2deg); -webkit-transform-origin: bottom right; background: #48b2c1; -webkit-animation: chart1 1s linear; display: block;
}
.donut-chart.chart1 .quad.two { -webkit-transform: rotate(90deg); -webkit-transform-origin: bottom right; background: #48b2c1; -webkit-animation: chartRotate2 1s linear; display: block;
}
.donut-chart.chart1 .quad.three { -webkit-transform: rotate(180deg); -webkit-transform-origin: bottom right; background: #48b2c1; -webkit-animation: chartRotate3 1s linear; display: block;
}
.donut-chart.chart1 .quad.four { -webkit-transform: rotate(270deg); -webkit-transform-origin: bottom right; background: #48b2c1; -webkit-animation: chartRotate4 1s linear;
}
.donut-chart.chart1 .quad.top { display: block; background: #e1e1e1;
}
.donut-chart.chart1 .chart-center { top: 25px; left: 25px; width: 250px; height: 250px; background: #fff;
}
.donut-chart.chart1 .chart-center:after { display: inline-block; width: 100%; font-size: 60px; color: #48b2c1; text-align: center; line-height: 250px; content: "67%";
}
@-webkit-keyframes chart2 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(133.2deg); }
}
@-webkit-keyframes chartRotate2 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(90deg); }
}
@-webkit-keyframes chartRotate3 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(180deg); }
}
@-webkit-keyframes chartRotate4 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(270deg); }
}
@-webkit-keyframes chartCover { 0%, 90% { opacity: 1; } 91%, 100% { opacity: 0; }
}
.donut-chart.chart2 { width: 200px; height: 200px; background: #e1e1e1;
}
.donut-chart.chart2 .quad { width: 100px; height: 100px; top: 0; left: 0; border-radius: 100% 0 0 0; display: none;
}
.donut-chart.chart2 .quad.one { -webkit-transform: rotate(133.2deg); -webkit-transform-origin: bottom right; background: #f26a4a; -webkit-animation: chart2 2s linear; display: block;
}
.donut-chart.chart2 .quad.two { -webkit-transform: rotate(90deg); -webkit-transform-origin: bottom right; background: #f26a4a; -webkit-animation: chartRotate2 2s linear; display: block;
}
.donut-chart.chart2 .quad.three { -webkit-transform: rotate(180deg); -webkit-transform-origin: bottom right; background: #f26a4a; -webkit-animation: chartRotate3 2s linear;
}
.donut-chart.chart2 .quad.four { -webkit-transform: rotate(270deg); -webkit-transform-origin: bottom right; background: #f26a4a; -webkit-animation: chartRotate4 2s linear;
}
.donut-chart.chart2 .quad.top { display: block; background: #e1e1e1;
}
.donut-chart.chart2 .chart-center { top: 15px; left: 15px; width: 170px; height: 170px; background: #fff;
}
.donut-chart.chart2 .chart-center:after { display: inline-block; width: 100%; font-size: 40px; color: #f26a4a; text-align: center; line-height: 170px; content: "37%";
}
@-webkit-keyframes chart3 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(61.2deg); }
}
@-webkit-keyframes chartRotate2 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(90deg); }
}
@-webkit-keyframes chartRotate3 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(180deg); }
}
@-webkit-keyframes chartRotate4 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(270deg); }
}
@-webkit-keyframes chartCover { 0%, 90% { opacity: 1; } 91%, 100% { opacity: 0; }
}
.donut-chart.chart3 { width: 150px; height: 150px; background: #e1e1e1;
}
.donut-chart.chart3 .quad { width: 75px; height: 75px; top: 0; left: 0; border-radius: 100% 0 0 0; display: none;
}
.donut-chart.chart3 .quad.one { -webkit-transform: rotate(61.2deg); -webkit-transform-origin: bottom right; background: #353535; -webkit-animation: chart3 1.5s linear; display: block;
}
.donut-chart.chart3 .quad.two { -webkit-transform: rotate(90deg); -webkit-transform-origin: bottom right; background: #353535; -webkit-animation: chartRotate2 1.5s linear;
}
.donut-chart.chart3 .quad.three { -webkit-transform: rotate(180deg); -webkit-transform-origin: bottom right; background: #353535; -webkit-animation: chartRotate3 1.5s linear;
}
.donut-chart.chart3 .quad.four { -webkit-transform: rotate(270deg); -webkit-transform-origin: bottom right; background: #353535; -webkit-animation: chartRotate4 1.5s linear;
}
.donut-chart.chart3 .quad.top { display: block; background: #e1e1e1;
}
.donut-chart.chart3 .chart-center { top: 10px; left: 10px; width: 130px; height: 130px; background: #fff;
}
.donut-chart.chart3 .chart-center:after { display: inline-block; width: 100%; font-size: 30px; color: #353535; text-align: center; line-height: 130px; content: "17%";
}
@-webkit-keyframes chart4 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(334.8deg); }
}
@-webkit-keyframes chartRotate2 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(90deg); }
}
@-webkit-keyframes chartRotate3 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(180deg); }
}
@-webkit-keyframes chartRotate4 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(270deg); }
}
@-webkit-keyframes chartCover { 0%, 90% { opacity: 1; } 91%, 100% { opacity: 0; }
}
.donut-chart.chart4 { width: 250px; height: 250px; background: #e1e1e1;
}
.donut-chart.chart4 .quad { width: 125px; height: 125px; top: 0; left: 0; border-radius: 100% 0 0 0; display: none;
}
.donut-chart.chart4 .quad.one { -webkit-transform: rotate(334.8deg); -webkit-transform-origin: bottom right; background: #50C690; -webkit-animation: chart4 0.5s linear; display: block;
}
.donut-chart.chart4 .quad.two { -webkit-transform: rotate(90deg); -webkit-transform-origin: bottom right; background: #50C690; -webkit-animation: chartRotate2 0.5s linear; display: block;
}
.donut-chart.chart4 .quad.three { -webkit-transform: rotate(180deg); -webkit-transform-origin: bottom right; background: #50C690; -webkit-animation: chartRotate3 0.5s linear; display: block;
}
.donut-chart.chart4 .quad.four { -webkit-transform: rotate(270deg); -webkit-transform-origin: bottom right; background: #50C690; -webkit-animation: chartRotate4 0.5s linear; display: block;
}
.donut-chart.chart4 .quad.top { display: block; background: #e1e1e1; opacity: 0; -webkit-animation: chartCover 0.01s linear 0.41667s both;
}
.donut-chart.chart4 .chart-center { top: 40px; left: 40px; width: 170px; height: 170px; background: #fff;
}
.donut-chart.chart4 .chart-center:after { display: inline-block; width: 100%; font-size: 50px; color: #50C690; text-align: center; line-height: 170px; content: "93%";
}
CSS Donut Charts - Animated - Script Codes
CSS Donut Charts - Animated - Script Codes
Home Page Home
Developer Sean Stopnik
Username seanstopnik
Uploaded December 21, 2022
Rating 3
Size 3,502 Kb
Views 10,120
Do you need developer help for CSS Donut Charts - Animated?

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!

Sean Stopnik (seanstopnik) Script Codes
Create amazing love letters 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!