Gráfico Circular puro CSS
How do I make an gráfico circular puro css?
Pie Charts pure CSS. Credits: based and original from Kyle Larson´s blog: http://www.kylejlarson.com/blog/2011/how-to-create-pie-charts-with-css3/. What is a gráfico circular puro css? How do you make a gráfico circular puro css? This script and codes were developed by Kseso on 23 August 2022, Tuesday.
Gráfico Circular puro CSS - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Gráfico Circular puro CSS</title> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ * { box-sizing: border-box;
}
.grafico { height: 200px; margin: 1rem auto; position: relative; width: 200px; }
.recorte { border-radius: 50%; clip: rect(0px, 200px, 200px, 100px); height: 100%; position: absolute; width: 100%; }
.quesito { border-radius: 50%; clip: rect(0px, 100px, 200px, 0px); height: 100%; position: absolute; width: 100%; font-family: monospace; font-size: 1.5rem; }
.sombra { background-color: #fff; border-radius: 50%; box-shadow: 0 4px 7px rgba(0, 0, 0, 0.3); border: 5px solid #000; height: 100%; position: absolute; width: 100%; }
#porcion1 { transform: rotate(0deg); }
#porcion1 .quesito { background-color: rgba(0,0,255,.7); transform: rotate(70deg); }
#porcion2 { transform: rotate(70deg); }
#porcion2 .quesito { background-color: rgba(255,255,0,.7); transform: rotate(120deg); }
#porcion3 { transform: rotate(-170deg); }
#porcion3 .quesito { background-color: rgba(0,128,0,.7); transform: rotate(25deg); }
#porcionFin { transform:rotate(-145deg); }
#porcionFin .quesito { background-color: rgba(255,0,0,.7); transform: rotate(145deg); }
#porcion1 .quesito:after { content: attr(data-rel); left: 25%; line-height: 5; position: absolute; top: 0; transform: rotate(-70deg);
}
#porcion2 .quesito:after { content: attr(data-rel); left: 15%; position: absolute; top: 30%; transform: rotate(-190deg);
}
#porcion3 .quesito:after { content: attr(data-rel); left: 35%; position: absolute; top: 4%; transform: rotate(70deg);
}
#porcionFin .quesito:after { content: attr(data-rel); left: 10%; position: absolute; top: 30%;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="grafico"> <div class="sombra"></div> <div id="porcion1" class="recorte"><div class="quesito" data-rel="70"></div></div> <div id="porcion2" class="recorte"><div class="quesito" data-rel="120"></div></div> <div id="porcion3" class="recorte"><div class="quesito" data-rel="25"></div></div> <div id="porcionFin" class="recorte"><div class="quesito" data-rel="145"></div></div>
</div> <script src="js/index.js"></script>
</body>
</html>
Gráfico Circular puro CSS - Script Codes CSS Codes
* { box-sizing: border-box;
}
.grafico { height: 200px; margin: 1rem auto; position: relative; width: 200px; }
.recorte { border-radius: 50%; clip: rect(0px, 200px, 200px, 100px); height: 100%; position: absolute; width: 100%; }
.quesito { border-radius: 50%; clip: rect(0px, 100px, 200px, 0px); height: 100%; position: absolute; width: 100%; font-family: monospace; font-size: 1.5rem; }
.sombra { background-color: #fff; border-radius: 50%; box-shadow: 0 4px 7px rgba(0, 0, 0, 0.3); border: 5px solid #000; height: 100%; position: absolute; width: 100%; }
#porcion1 { transform: rotate(0deg); }
#porcion1 .quesito { background-color: rgba(0,0,255,.7); transform: rotate(70deg); }
#porcion2 { transform: rotate(70deg); }
#porcion2 .quesito { background-color: rgba(255,255,0,.7); transform: rotate(120deg); }
#porcion3 { transform: rotate(-170deg); }
#porcion3 .quesito { background-color: rgba(0,128,0,.7); transform: rotate(25deg); }
#porcionFin { transform:rotate(-145deg); }
#porcionFin .quesito { background-color: rgba(255,0,0,.7); transform: rotate(145deg); }
#porcion1 .quesito:after { content: attr(data-rel); left: 25%; line-height: 5; position: absolute; top: 0; transform: rotate(-70deg);
}
#porcion2 .quesito:after { content: attr(data-rel); left: 15%; position: absolute; top: 30%; transform: rotate(-190deg);
}
#porcion3 .quesito:after { content: attr(data-rel); left: 35%; position: absolute; top: 4%; transform: rotate(70deg);
}
#porcionFin .quesito:after { content: attr(data-rel); left: 10%; position: absolute; top: 30%;
}
Gráfico Circular puro CSS - Script Codes JS Codes
// Gráfico circular puro css
// Modificación sobre el original de Kyle Larson publicado en su blog:
// "How to Create Pie Charts with CSS3"
// http://www.kylejlarson.com/blog/2011/how-to-create-pie-charts-with-css3/
// Este pen es sólo a efectos de ilustrar un artículo en mi blog.
Developer | Kseso |
Username | Kseso |
Uploaded | August 23, 2022 |
Rating | 3 |
Size | 2,877 Kb |
Views | 36,432 |
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!
Name | Size |
DYNAMIC INSIDE BLUR PURE CSS | 4,925 Kb |
Gamma-Corrected Colorizing | 2,877 Kb |
Parallax pure Css | 3,274 Kb |
Double checked. Pure Css | 6,280 Kb |
Three Labels for each Input | 5,413 Kb |
Picture with art direction by orientation | 1,604 Kb |
Charts pure Css | 6,674 Kb |
Animated Border Menus pure Css | 4,278 Kb |
Aspect ratios pure Css | 2,661 Kb |
MagiCSSKroll | 4,647 Kb |
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!
Name | Username | Size |
FCC Portfolio | Cmwebby | 4,304 Kb |
Svg animation draw | SzymonDziewonski | 5,545 Kb |
Dribbble Template | ExtremelyGinger | 2,204 Kb |
Testing Portfolio Page | Sideshowli | 3,395 Kb |
TweetBox with React JS | J0zelito | 3,325 Kb |
CSS3 Fullscreen Background Slideshow | Leetech | 3,435 Kb |
Portfolio page | Bhavya_j | 2,804 Kb |
Content Changer | Cliffpyles | 4,538 Kb |
TheCalendar.js | The-teacher | 6,330 Kb |
Funny menu | AxeLVaisper | 4,671 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!