forked from eracom/exemples-javascript
-
Notifications
You must be signed in to change notification settings - Fork 1
/
piechart.html
70 lines (52 loc) · 1.39 KB
/
piechart.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!doctype html>
<html>
<head>
<title>animation</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font-family: "Roboto Mono", sans-serif;
font-size: 120%;
margin: 0;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
}
.pie {
width: 50vmin;
height: 50vmin;
border-radius: 50%;
background: yellowgreen;
margin: auto;
background-image: linear-gradient(to right, transparent 50%, #655 0);
overflow: hidden;
}
.pie::before {
content: '';
display: block;
margin-left: 50%;
height: 100%;
border-radius: 0 100% 100% 0 / 50%;
background-color: inherit;
transform-origin: left;
animation: spin 2s linear infinite, bg 4s step-end infinite;
animation-delay: inherit;
}
@keyframes spin {
to { transform: rotate(.5turn); }
}
@keyframes bg {
50% { background: #655; }
}
</style>
</head>
<body>
<div class="pie">
</div>
<script>
</script>
</body>
</html>