-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspool.html
172 lines (154 loc) · 3.63 KB
/
spool.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="main.css">
<title>CSS Art | Spool</title>
</head>
<body>
<style>
body {
margin: 0;
padding: 0;
}
* {
box-sizing: border-box;
}
.content {
display: grid;
justify-items: center;
align-items: center;
height: 100vh;
background: linear-gradient(#fff8ef, #fff)
}
.content>div {
display: flex;
justify-content: center;
}
.top {
position: relative;
z-index: 2;
}
.top>div:first-child {
position: relative;
width: 100px;
height: 25px;
margin-bottom: -26px;
border-bottom-right-radius: 50% 18px;
border-bottom-left-radius: 50% 18px;
background: radial-gradient(ellipse at top center, #927754, tan);
z-index: 1;
}
.top>div:first-child::after {
position: absolute;
bottom: 10px;
left: 0;
width: 100px;
height: 100px;
border-radius: 50%;
background: radial-gradient(black 8px, tan 6px, #927754);
transform: rotateX(72deg);
transform-origin: bottom center;
content: '';
}
.top>div:last-child {
position: relative;
width: 100px;
height: 28px;
background-color: #8a775e;
border-bottom-right-radius: 20px 80%;
border-bottom-left-radius: 20px 80%;
}
.top>div:last-child::after {
position: absolute;
top: 6px;
right: 50%;
width: 80px;
height: 28px;
border-bottom-right-radius: 50% 10px;
border-bottom-left-radius: 50% 10px;
background-color: #8a775e;
transform: translateX(50%);
content: '';
}
.thread {
position: relative;
width: 80px;
height: 125px;
margin-top: -20px;
margin-right: auto;
margin-left: auto;
background: repeating-radial-gradient(circle at left -50%, transparent, transparent 5px, #33383d 6px, transparent 7px, transparent, transparent 20px, #33383d 21px), repeating-radial-gradient(circle at right -50%, transparent, transparent 12px, #33383d 13px, transparent 14px, transparent, transparent 20px, #33383d 21px), repeating-radial-gradient(circle at center -50%, teal, #236666 2px, #33383d 3px);
border-bottom-right-radius: 50% 18px;
border-bottom-left-radius: 50% 18px;
z-index: 1;
}
.bottom {
position: relative;
margin-top: -6px;
margin-right: auto;
margin-left: auto;
width: 96px;
height: 30px;
background-color: #8f7553;
border-bottom-right-radius: 50% 18px;
border-bottom-left-radius: 50% 18px;
}
.bottom::after {
position: absolute;
bottom: 11px;
right: 50%;
width: 96px;
height: 40px;
background: radial-gradient(ellipse at top center, #927754, #927754, tan);
border-top-right-radius: 25px 23px;
border-bottom-right-radius: 50% 17px;
border-bottom-left-radius: 50% 17px;
border-top-left-radius: 25px 23px;
transform: translateX(50%);
content: '';
}
.needle {
position: relative;
margin-left: 30px;
width: 5px;
height: 150px;
border-top-right-radius: 50% 10px;
border-bottom-right-radius: 50% 140px;
border-bottom-left-radius: 50% 140px;
border-top-left-radius: 50% 10px;
background: linear-gradient(to right, #909090, #797979, silver, #575555);
}
.needle::after {
position: absolute;
top: 5px;
right: 50%;
width: 2px;
height: 7px;
border-radius: 50%;
background-color: #fff;
transform: translateX(50%);
content: '';
}
</style>
</body>
<header class="art-page-header">
<a href="index.html" class="app-text-link">
<span>index.html</span>
</a>
</header>
<div class="content">
<div>
<div class="spool">
<div class="top">
<div></div>
<div></div>
</div>
<div class="thread"></div>
<div class="bottom"></div>
</div>
<div class="needle"></div>
</div>
</div>
</html>