-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Expand file tree
/
Copy pathModal.css
More file actions
53 lines (49 loc) · 929 Bytes
/
Modal.css
File metadata and controls
53 lines (49 loc) · 929 Bytes
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
.Modal {
position: fixed;
z-index: 200;
border: 1px solid #eee;
box-shadow: 0 2px 2px #ccc;
background-color: white;
padding: 10px;
text-align: center;
box-sizing: border-box;
top: 30%;
left: 25%;
width: 50%;
transition: all 0.3s ease-out;
}
.ModalOpen {
animation: openModal 0.4s ease-out forwards;
}
.ModalClosed {
animation: closeModal 0.4s ease-out forwards;
z-index: -100;
}
@keyframes openModal {
0% {
opacity: 0;
transform: translateY(-100%);
}
50% {
opacity: 1;
transform: translateY(90%);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
@keyframes closeModal {
0% {
opacity: 1;
transform: translateY(0);
}
50% {
opacity: 0.8;
transform: translateY(60%);
}
100% {
opacity: 0;
transform: translateY(-100%);
}
}