-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcaligraphy.html
44 lines (37 loc) · 932 Bytes
/
caligraphy.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
<html>
<head>
<title>Caligraphy</title>
</head>
<body>
<div class="sun"></div>
</body>
<style>
:root {
overflow: hidden;
/* hides any part of the sun below the horizon */
background-color: lightblue;
display: flex;
justify-content: center;
/* centers the sun in the background */
}
.sun {
background-color: yellow;
border-radius: 50%;
/* creates a circular background */
height: 100vh;
/* makes the sun the size of the viewport */
aspect-ratio: 1 / 1;
animation: 4s linear 0s infinite alternate sun-rise;
}
@keyframes sun-rise {
from {
/* pushes the sun down past the viewport */
transform: translateY(110vh);
}
to {
/* returns the sun to its default position */
transform: translateY(0);
}
}
</style>
</html>