-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3D-Pie.html
86 lines (75 loc) · 1.5 KB
/
3D-Pie.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!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>Document</title>
<style>
html,
boyd {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
position: relative;
}
.box {
width: 202px;
height: 202px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
transform-style: preserve-3d;
/* perspective: 200px; */
}
.pie {
height: 100%;
border: 1px solid #000;
transform-style: preserve-3d;
perspective: 1000px;
position: relative;
transform: rotateX(10deg);
}
.pie::before,
.pie::after {
content: "";
display: block;
width: 200px;
height: 200px;
border: 1px solid #000;
position: absolute;
}
.pie::before {
transform: rotate3d(0, 1, 0, 60deg);
}
.pie::after {
transform: rotate3d(0, 1, 0, -60deg);
}
.top,
.bottom {
width: 200px;
height: 200px;
border-radius: 50%;
border: 1px solid black;
transform: rotate3d(1, 0, 0, 60deg);
position: absolute;
}
.top {
top: -100px;
}
.bottom {
bottom: -100px;
}
</style>
</head>
<body>
<div class="box">
<div class="pie">
<div class="top"></div>
<div class="bottom"></div>
</div>
</div>
</body>
</html>