-
Notifications
You must be signed in to change notification settings - Fork 14
/
smile.html
124 lines (114 loc) · 2.51 KB
/
smile.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
<!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>
#container {
margin: 0 auto;
width: 10%;
margin-top: 100px;
}
.emoji {
box-sizing: border-box;
float: left;
}
.face {
width: 100px;
height: 100px;
position: relative;
margin: 0 15px 30px 0;
border-radius: 50%;
background: #f2dd68;
}
.face:after {
content: "";
display: block;
position: absolute;
width: 100%;
height: 100%;
top: -8px;
left: -8px;
border-radius: 50%;
box-shadow: 8px 8px 0 0 rgba(0, 0, 0, 0.07);
}
.eye {
position: absolute;
width: 11px;
height: 11px;
top: 32px;
left: 16px;
z-index: 1;
border-radius: 50%;
background: #995710;
}
.eye:last-child {
left: auto;
right: 16px;
}
.emoji:hover .eye {
animation-name: blink;
animation-iteration-count: infinite;
animation-duration: 2s;
}
@keyframes blink {
10% {
height: 11px;
top: 32px;
}
30% {
height: 1px;
top: 37px;
}
50% {
height: 11px;
top: 32px;
}
}
.mouth {
position: absolute;
top: 48px;
left: 0;
right: 0;
z-index: 1;
width: 70px;
height: 34px;
margin: 0 auto;
border-radius: 0 0 70px 70px;
overflow: hidden;
background: #995710;
}
.mouth:before,
.mouth:after {
content: "";
position: absolute;
display: block;
}
.smile .mouth {
width: 50px;
height: 25px;
background: transparent;
border-radius: 0 0 50px 50px;
border: 4px solid #995710;
border-top: 0;
-webkit-clip-path: inset(30% 0 0 0);
clip-path: inset(30% 0 0 0);
}
</style>
</head>
<body>
<div id="container">
<div class="emoji smile">
<figure class="face">
<span class="eyes">
<span class="eye"></span>
<span class="eye"></span>
</span>
<span class="mouth"></span>
</figure>
</div>
</div>
</body>
</html>