forked from Sanskar1123/aakritisbirthday.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcssEyesAnimation.css
More file actions
118 lines (117 loc) · 1.68 KB
/
Copy pathcssEyesAnimation.css
File metadata and controls
118 lines (117 loc) · 1.68 KB
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
.wrapper {
position: relative;
top: 55%;
left: 50%;
transform: translate(-50%, -50%);
width: 30vw;
display: flex;
justify-content: space-between;
transform: translate3d(-50%, -70%, 0);
}
.nose {
content: "";
position: relative;
top: 30%;
left: 50%;
width: 10vw;
height: 13vh;
background: red;
border-radius: 50%;
transform: translate(-50%, -50%);
}
.eye {
position: relative;
width: 12vw;
height: 10px;
background: #fff;
border-radius: 50%;
animation: eye 3.5s infinite;
}
.left span,
.right span {
content: "";
position: relative;
top: -15%;
left: 10%;
display: block;
width: 65%;
height: 2%;
background: #000;
border: 20px solid #000;
border-radius: 50%;
}
.left span:before,
.right span:before {
content: "";
position: absolute;
top: 10%;
left: -2%;
width: 9vw;
height: 3vh;
background: #ff6600;
border-radius: 70% 70% 0 0;
}
.eye::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 65%;
height: 65%;
background: #000;
border-radius: 50%;
transform: translate3d(-50%, -50%, 0);
animation: eyes 17.5s infinite;
}
@keyframes eye {
0%,
5%,
30%,
37%,
100% {
height: 260px;
transform: translate3d(0, 0, 0);
}
3%,
33% {
height: 0;
transform: translate3d(0, -50%, 0);
}
}
@keyframes eyes {
0%,
20% {
transform: translate3d(-100%, -50%, 0);
}
21%,
40%,
81%,
100% {
transform: translate3d(-50%, -50%, 0);
}
41%,
60% {
transform: translate3d(0, -50%, 0);
}
61%,
80% {
transform: translate3d(-50%, 0, 0);
}
}
@media only screen and (max-width: 481px) {
.wrapper {
top: 55%;
left: 50%;
width: 180px;
}
.nose {
top: 35%;
left: 50%;
width: 14vw;
height: 12vh;
}
.eye {
width: 20vw;
height: 5vh;
}
}