forked from you-dont-need/You-Dont-Need-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScrollingText.html
More file actions
149 lines (132 loc) · 3.07 KB
/
Copy pathScrollingText.html
File metadata and controls
149 lines (132 loc) · 3.07 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hot Cofee</title>
</head>
<style>
body {
background: #8acdeb;
}
#container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.steam {
position: absolute;
height: 150px;
width: 150px;
border-radius: 50%;
background-color: #fff;
margin-top: -75px;
margin-left: 75px;
z-index: 0;
opacity: 0;
}
#steam1 {
-webkit-animation: steam1 4s ease-out infinite;
animation: steam1 4s ease-out infinite;
}
#steam3 {
-webkit-animation: steam1 4s ease-out 1s infinite;
animation: steam1 4s ease-out 1s infinite;
}
@-webkit-keyframes steam1 {
0% {transform: translateY(0) translateX(0) scale(0.25); opacity: 0.2;}
100% {transform: translateY(-200px) translateX(-20px) scale(1); opacity: 0;}
}
@keyframes steam1 {
0% {transform: translateY(0) translateX(0) scale(0.25); opacity: 0.2;}
100% {transform: translateY(-200px) translateX(-20px) scale(1); opacity: 0;}
}
#steam2 {
-webkit-animation: steam2 4s ease-out 0.5s infinite;
animation: steam2 4s ease-out 0.5s infinite;
}
#steam4 {
-webkit-animation: steam2 4s ease-out 1.5s infinite;
animation: steam2 4s ease-out 1.5s infinite;
}
@-webkit-keyframes steam2 {
0% {transform: translateY(0) translateX(0) scale(0.25); opacity: 0.2;}
100% {transform: translateY(-200px) translateX(20px) scale(1); opacity: 0;}
}
@keyframes steam2 {
0% {transform: translateY(0) translateX(0) scale(0.25); opacity: 0.2;}
100% {transform: translateY(-200px) translateX(20px) scale(1); opacity: 0;}
}
#cup {
z-index: 1;
}
#cup-body {
position: absolute;
height: 200px;
width: 300px;
border-radius: 0 0 150px 150px;
background-color: #fff;
margin: auto;
display: inline-block;
overflow: hidden;
z-index: 1;
}
#cup-shade {
position: relative;
height: 300px;
width: 200px;
background-color: #F3F3F3;
display: inline-block;
margin-left: 42%;
margin-top: -3px;
transform: rotate(50deg);
z-index: 1;
}
#cup-handle {
position: relative;
height: 75px;
width: 80px;
border-radius: 0 150px 150px 0;
border: 15px solid #F3F3F3;
margin-bottom: 95px;
margin-left: 250px;
display: inline-block;
z-index: 0;
}
#saucer {
position: absolute;
height: 30px;
width: 300px;
border-radius: 0 0 100px 100px;
background-color: #F9F9F9;
margin-top: -32px;
margin-left: 5px;
z-index: 2;
}
#shadow {
height: 10px;
width: 300px;
border-radius: 50%;
margin-top: -5px;
margin-left: 6px;
background-color: #7bb8d4;
}
</style>
<body>
<div id="container">
<div class="steam" id="steam1"> </div>
<div class="steam" id="steam2"> </div>
<div class="steam" id="steam3"> </div>
<div class="steam" id="steam4"> </div>
<div id="cup">
<div id="cup-body">
<div id="cup-shade"></div>
</div>
<div id="cup-handle"></div>
</div>
<div id="saucer"></div>
<div id="shadow"></div>
</div>
</body>
</html>