-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
125 lines (108 loc) · 2.03 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
.container {
width: 70%;
margin: auto;
text-align: center;
}
.dice {
display: inline-block;
margin: 20px;
}
body {
position: relative; /* Make body relative for absolute positioning of stars */
overflow: hidden; /* Hide overflowing stars */
background-color: black; /* Set background color */
}
/* Twinkling stars background */
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 1%, rgba(0, 0, 0, 0) 50%);
z-index: -1;
animation: dazzlingStars 10s linear infinite; /* Adjust animation duration as needed */
}
/* Animation for dazzling stars */
@keyframes dazzlingStars {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.2;
}
}
.star {
position: absolute;
width: 2px;
height: 2px;
background-color: white;
opacity: 0.5; /* Set initial opacity */
animation: flicker 1s infinite alternate; /* Flickering animation */
}
/* Randomly position stars */
.star:nth-child(1) {
top: 20%;
left: 20%;
}
.star:nth-child(2) {
top: 40%;
left: 50%;
}
.star:nth-child(3) {
top: 60%;
left: 80%;
}
.star:nth-child(4) {
top: 80%;
left: 30%;
}
.star:nth-child(5) {
top: 90%;
left: 70%;
}
/* Flickering animation */
@keyframes flicker {
0% {
opacity: 0.5;
}
50% {
opacity: 1;
}
100% {
opacity: 0.5;
}
}
h1 {
margin: 30px;
font-family: 'Lobster', cursive;
text-shadow: 5px 0 #232931;
font-size: 4rem; /* Adjusted font size */
color: #fff;
}
p {
font-size: 2rem;
color: #fff;
font-family: 'Indie Flower', cursive;
}
img {
width: 150px; /* Adjusted width for dice images */
height: 150px; /* Adjusted height for dice images */
display: block;
transition: transform 0.5s ease-in-out;
}
/* Add animations */
@keyframes roll {
0% { transform: rotateY(0); }
100% { transform: rotateY(360deg); }
}
.dice.roll img {
animation: roll 1s ease-in-out infinite;
}
footer {
margin-top: 5%;
color: #EEEEEE;
text-align: center;
font-family: 'Indie Flower', cursive;
}