-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
106 lines (94 loc) · 1.86 KB
/
styles.css
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
body, html {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
background: radial-gradient(circle at bottom, #1b2735 0%, #090a0f 100%);
}
.night {
position: relative;
width: 100%;
height: 100vh;
overflow: hidden;
}
/* Shooting Star General Styles */
.shooting_star {
position: absolute;
top: -10%; /* Start off-screen */
left: -10%; /* Start off-screen */
width: 2px;
height: 150px;
background: linear-gradient(45deg, white, transparent);
transform: rotate(45deg);
animation: shooting-star 3s ease-in-out infinite;
opacity: 0;
}
/* Creating multiple stars at random positions */
.shooting_star:nth-child(1) {
animation-delay: 0.5s;
top: 20%;
left: 15%;
animation-duration: 3s;
}
.shooting_star:nth-child(2) {
animation-delay: 1.2s;
top: 40%;
left: 30%;
animation-duration: 2.5s;
}
.shooting_star:nth-child(3) {
animation-delay: 2s;
top: 10%;
left: 50%;
animation-duration: 4s;
}
.shooting_star:nth-child(4) {
animation-delay: 2.8s;
top: 60%;
left: 20%;
animation-duration: 3.5s;
}
.shooting_star:nth-child(5) {
animation-delay: 3.5s;
top: 30%;
left: 70%;
animation-duration: 3.2s;
}
.shooting_star:nth-child(6) {
animation-delay: 4.1s;
top: 50%;
left: 85%;
animation-duration: 3.6s;
}
.shooting_star:nth-child(7) {
animation-delay: 1.5s;
top: 80%;
left: 40%;
animation-duration: 3.8s;
}
.shooting_star:nth-child(8) {
animation-delay: 2.3s;
top: 20%;
left: 75%;
animation-duration: 4.5s;
}
.shooting_star:nth-child(9) {
animation-delay: 3s;
top: 60%;
left: 60%;
animation-duration: 3s;
}
/* Shooting star animation keyframes */
@keyframes shooting-star {
0% {
transform: translateX(0) translateY(0) rotate(45deg) scale(0.5);
opacity: 0;
}
20% {
opacity: 1;
}
100% {
transform: translateX(100vw) translateY(100vh) rotate(45deg) scale(1);
opacity: 0;
}
}