-
Notifications
You must be signed in to change notification settings - Fork 2
/
Santa.html
168 lines (167 loc) · 3.45 KB
/
Santa.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
<!DOCTYPE >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>圣诞老人 from antd</title>
<style>
.santa {
display: inline-block;
margin-left: -8px;
transform: scale(0.4);
vertical-align: middle;
}
.santa-body {
align-items: center;
animation: 2s ease-in-out 0s alternate none infinite running balance;
background-color: currentcolor;
border-radius: 50%;
box-shadow: 0 -0.25em rgba(0, 0, 0, 0.1) inset;
color: #f91047;
display: flex;
font-size: 60px;
height: 1em;
justify-content: center;
transform-origin: center bottom 0;
width: 1em;
}
.santa-head {
background-color: white;
border-radius: 0.5em;
font-size: 0.4em;
height: 1.9em;
position: relative;
transform: translateY(-1em);
width: 1em;
}
.santa-head::before {
background-color: #ff9876;
content: "";
display: block;
height: 0.375em;
left: 0;
position: absolute;
top: 0.65em;
width: 1em;
}
.santa-ear {
background-color: #fc8363;
height: 0.3em;
position: absolute;
top: 0.75em;
width: 0.1em;
}
.santa-ear:nth-of-type(1) {
border-radius: 0.05em 0 0 0.05em;
left: -0.1em;
}
.santa-ear:nth-of-type(2) {
border-radius: 0 0.05em 0.05em 0;
right: -0.1em;
}
.santa-hat {
background-color: white;
content: "";
height: 0.15em;
left: 0;
position: absolute;
top: 0.5em;
transform: scale(1.1);
width: 1em;
}
.santa-hat::before {
background: #f91047 none repeat scroll 0 0;
border-radius: 0.5em 0.5em 0 0;
content: "";
display: block;
height: 0.5em;
position: absolute;
top: -0.5em;
width: 1em;
z-index: 2;
}
.santa-hat::after {
background-color: white;
border-radius: 50%;
box-shadow: -0.2em 0.2em 0 0.12em rgba(0, 0, 0, 0.2), -0.2em 0.2em 0 0.12em #f91047;
content: "";
display: block;
height: 0.25em;
position: absolute;
right: 0;
top: -0.72em;
width: 0.25em;
z-index: 0;
}
.santa-eye {
background-color: black;
border-radius: 50%;
height: 0.12em;
left: 0.2em;
position: absolute;
top: 0.76em;
width: 0.12em;
}
.santa-eye + .santa-eye {
left: auto;
right: 0.2em;
}
.santa-nose {
background-color: #f24c4c;
border-radius: 0 0 0.12em 0.12em;
height: 0.22em;
left: 50%;
position: absolute;
top: 0.84em;
transform: translateX(-50%);
width: 0.12em;
}
.santa-mouth {
animation: 4s linear 0s normal forwards infinite running hohoho;
background-color: black;
border-bottom-left-radius: 5vw;
border-bottom-right-radius: 5vw;
height: 0.1em;
left: 50%;
margin-top: 0.3em;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
width: 0.18em;
}
@keyframes hohoho {
0%, 10%, 20%, 40%, 100% {
border-bottom-left-radius: 1vw;
border-bottom-right-radius: 1vw;
height: 0.1em;
width: 0.18em;
}
5%, 15%, 25%, 35% {
border-radius: 50%;
height: 0.2em;
width: 0.15em;
}
}
@keyframes balance {
0% {
transform: rotate(-6deg);
}
100% {
transform: rotate(6deg);
}
}
</style>
</head>
<body>
<div class="santa-body">
<div class="santa-head">
<div class="santa-ear"></div>
<div class="santa-ear"></div>
<div class="santa-hat"></div>
<div class="santa-eye"></div>
<div class="santa-eye"></div>
<div class="santa-nose"></div>
<div class="santa-mouth"></div>
</div>
</div>
</body>
</html>