This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodal.css
114 lines (100 loc) · 2.19 KB
/
modal.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
#myImg {
border-radius: 5px;
cursor: pointer;
transition: 0.3s;
}
#myImg:hover {opacity: 0.7;}
/* Style the Image Used to Trigger the Modal */
/* The Modal (background) */
.modal {
display: none; /* Hidden by default */
position: absolute; /* Stay in place */
z-index: 100; /* Sit on top */
padding-top: 0; /* Location of the box */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
backdrop-filter: blur(5px);
}
.modalDesc {
padding: 0;
color: black;
background-color: white;
font-size: 12px;
width: calc(100% - 2rem) !important;
max-width: 960px;
text-align: left;
}
.modalDesc p {
margin: 1rem;
}
.modal .img-scroll-container {
overflow: auto; /* Enable scroll if needed */
overflow-y: initial !important;
margin-top: auto;
margin-left: auto;
margin-right: auto;
height: 100vh;
width: 100%;
vertical-align: middle;
display: flex;
text-align: center;
}
.modal .img-scroll-container div {
width: fit-content;
height: fit-content;
margin: auto;
display: inline-block;
}
/* Modal Content (Image) */
.modal-content {
margin: auto;
display: block;
width: calc(100% - 2rem) !important;
max-width: 960px;
}
/* Caption of Modal Image (Image Text) - Same Width as the Image */
#caption {
margin: auto;
display: block;
width: 80%;
max-width: 700px;
text-align: center;
color: #ccc;
padding: 10px 0;
height: 150px;
}
/* Add Animation - Zoom in the Modal */
.modal-content, #caption {
animation-name: zoom;
animation-duration: 0.2s;
}
@keyframes zoom {
from {transform:scale(0)}
to {transform:scale(1)}
}
/* The Close Button */
.modal_close {
position: fixed !important;
top: 75px;
right: 30px;
}
.modal_summary{
position: fixed !important;
top: 135px;
right: 30px;
}
.modal_forecast {
position: fixed !important;
top: 195px;
right: 30px;
}
/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px){
.modal-content {
width: 100%;
}
}