-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDiceRollerPage.css
More file actions
52 lines (49 loc) · 1.06 KB
/
DiceRollerPage.css
File metadata and controls
52 lines (49 loc) · 1.06 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
.dice-animation-container {
display: flex;
flex-wrap: wrap;
justify-content: center; /* Changed to center for better aesthetics when fewer than 10 dice */
gap: 10px;
margin-top: 20px;
max-width: 710px; /* (60px width + 10px gap) * 10 dice - 10px (last gap) = 700px. Added 10px for padding/margin tolerance */
margin-left: auto;
margin-right: auto;
}
.dice-face {
flex-shrink: 0; /* Prevent dice from shrinking */
width: 60px;
height: 60px;
display: flex;
justify-content: center;
align-items: center;
border: 2px solid #ccc;
border-radius: 8px;
background-color: #333;
color: white;
font-size: 24px;
font-weight: bold;
}
.dice-face.rolling {
animation: roll 1s infinite linear;
}
@keyframes roll {
0% {
transform: rotate(0deg) scale(1);
opacity: 1;
}
25% {
transform: rotate(90deg) scale(1.1);
opacity: 0.8;
}
50% {
transform: rotate(180deg) scale(1);
opacity: 1;
}
75% {
transform: rotate(270deg) scale(1.1);
opacity: 0.8;
}
100% {
transform: rotate(360deg) scale(1);
opacity: 1;
}
}