-
Notifications
You must be signed in to change notification settings - Fork 0
/
welcome_Stars.css
59 lines (57 loc) · 1.6 KB
/
welcome_Stars.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
/* General styling for stars */
.star {
height: 3px;
width: 3px;
background-color: white;
display: inline-block;
border-radius: 50%;
position: absolute;
box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.8);
filter: blur(0px);
will-change: transform, box-shadow;
animation: randomMove linear infinite;
z-index: 0;
opacity: 0.8;
}
/* Constrained random movement animation (optimized) */
@keyframes randomMove {
0% {
transform: translate(0, 0); /* Start at current position */
}
25% {
transform: translate(5vw, 8vh); /* Move within the screen area */
}
50% {
transform: translate(-5vw, -8vh); /* Move back in the opposite direction */
}
75% {
transform: translate(3vw, -6vh); /* Slight movement up and right */
}
100% {
transform: translate(0, 0); /* Return to the original position */
}
}
/* Glow effect for stars */
/* @keyframes glow {
0% {
box-shadow: 0px 0px 20px rgba(255, 255, 255, 0.5),
0px 0px 30px rgba(255, 255, 255, 0.2),
0px 0px 40px rgba(255, 255, 255, 0.2),
0px 0px 60px rgba(255, 255, 255, 0.2),
0px 0px 70px rgba(255, 255, 255, 0.2);
}
100% {
box-shadow: 0px 0px 30px rgba(255, 255, 255, 1),
0px 0px 40px rgba(255, 255, 255, 0.8),
0px 0px 50px rgba(255, 255, 255, 0.2),
0px 0px 60px rgba(255, 255, 255, 0.2),
0px 0px 70px rgba(255, 255, 255, 0.2),
0px 0px 80px rgba(255, 255, 255, 0.2);
}
} */
@media (max-width: 654px) {
.star {
animation: none;
display: none;
}
}