-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpie.css
82 lines (79 loc) · 1.38 KB
/
pie.css
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
71
72
73
74
75
76
77
78
79
80
81
82
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700);
@keyframes bake-pie {
from {
transform: rotate(0deg) translate3d(0,0,0);
}
}
.pieID {
display: inline-block;
vertical-align: top;
}
.pie {
height: 200px;
width: 200px;
position: relative;
margin: 0 30px 30px 0;
}
.pie::before {
content: "";
display: block;
position: absolute;
background: #FFFFFF;
z-index: 1;
width: 100px;
height: 100px;
border-radius: 50%;
top: 50px;
left: 50px;
}
.pie::after {
content: "";
display: block;
width: 120px;
height: 2px;
background: rgba(0,0,0,0.1);
border-radius: 50%;
box-shadow: 0 0 3px 4px rgba(0,0,0,0.1);
margin: 220px auto;
}
.slice {
position: absolute;
width: 200px;
height: 200px;
clip: rect(0px, 200px, 200px, 100px);
animation: bake-pie 1s;
}
.slice span {
display: block;
position: absolute;
top: 0;
left: 0;
background-color: black;
width: 200px;
height: 200px;
border-radius: 50%;
clip: rect(0px, 200px, 200px, 100px);
}
.legend {
list-style-type: none;
padding: 0;
margin: 0;
background: #FFF;
padding: 15px;
font-size: 13px;
box-shadow: 1px 1px 0 #DDD,
2px 2px 0 #BBB;
}
.legend li {
width: 150px;
height: 1.25em;
margin-bottom: 0.7em;
padding-left: 0.5em;
border-left: 1.25em solid black;
}
.legend em {
font-style: normal;
}
.legend span {
float: right;
}