-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
125 lines (108 loc) · 1.87 KB
/
styles.css
File metadata and controls
125 lines (108 loc) · 1.87 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
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
* {
box-sizing: border-box;
font-size: 48px;
margin: 0;
padding: 0;
font-family: 'Montserrat', sans-serif;
}
body {
height: 100%;
background: darkcyan
}
.container {
display: flex;
justify-content: center;
align-items: center;
height: 850px;
}
.board {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
}
.card {
width: 100px;
height: 150px;
background: cyan;
border-radius: 5px;
display: flex;
justify-content: center;
align-items: center;
transition: .3s ease;
user-select: none;
}
.card.closed {
animation: card-close .5s forwards;
}
.card.opened {
animation: card-open .5s forwards;
}
.card-front {
position: absolute;
}
.card-front.closed {
animation: card-front-close .15s forwards;
}
.card-front.opened {
animation: card-front-open .15s forwards;
}
.restart {
width: 300px;
margin: auto;
text-align: center;
padding: 10px;
background: cyan;
border: black 2px solid;
border-radius: 10px;
user-select: none;
cursor: pointer;
transition: background-color .3s ease;
visibility: hidden;
}
.restart.visible {
visibility: visible;
}
.restart:hover {
background: rgb(0, 228, 228);
}
.restart:active {
background: rgb(0, 199, 199);
}
@keyframes card-open {
0% {
transform: rotateY(-180deg);
}
100% {
transform: rotateY(0);
}
}
@keyframes card-close {
0% {
transform: rotateY(0);
}
100% {
transform: rotateY(-180deg);
}
}
@keyframes card-front-open {
0% {
visibility: hidden;
}
99% {
visibility: hidden;
}
100% {
visibility: visible;
}
}
@keyframes card-front-close {
0% {
visibility: visible;
}
99% {
visibilite: visible;
}
100% {
visibility: hidden;
}
}