-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgallery_overlay.css
98 lines (85 loc) · 2.37 KB
/
gallery_overlay.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
/* Gallery Overlay Styling */
div#lbOverlay {
position: fixed; /* Overlay is fixed on screen */
z-index: 1; /* Overlay sits on top of other content */
width: 100%; /* Full width */
height: 100%; /* Full height */
top: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.808);
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
/* Styles for the figure box within the overlay */
div#lbOverlay figure {
display: block;
width: auto;
max-height: 90vh;
overflow: auto;
}
/* styles for the images */
div#lbOverlay figure img {
display: block;
margin-right: auto;
margin-left: auto;
max-width: 100%;
max-height: calc(80vh - 40px); /* fit within viewport - space for caption and padding*/
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.712), 0 0 0 1px rgba(0, 0, 0, 0.712);
animation-name: zoom;
animation-duration: 0.8s;
}
/* styles for the caption */
div#lbOverlay figure figcaption {
text-align: center;
font-size: 1.25em;
color: rgb(199, 199, 199);
margin-top: 10px;
background-color: rgba(0, 0, 0, 0.774);
animation-name: zoom;
animation-duration: 1s;
padding-top: 10px;
padding-bottom: 20px;
margin-top: 10px;
border-radius: 5px;
}
/* styles for the overlay close button */
div#lbOverlay div#lbOverlayClose {
position: absolute;
top: 20px;
right: 40px;
color: rgb(199, 199, 199);
font-size: 40px;
cursor: pointer !important;
user-select: none;
}
/* hovering style for the modal window close button */
div#lbOverlay div#lbOverlayClose:hover {
color: #a8a8a8;
text-shadow: 3px 3px 0px black;
cursor: pointer !important;
}
/* keyframe animation for the opening of the modal window figure and caption */
@keyframes zoom {
from {transform:scale(0)}
to {transform:scale(1)}
}
.no-scroll {
overflow: hidden;
}
/**********SMALL SCREENS*************/
@media only screen and (min-width: 220px) and (max-width: 991px) {
/* styles for the images */
div#lbOverlay figure img {
max-height: calc(90vh - 40px); /* fit within viewport - space for caption and padding */
display: block;
margin-left: 0;
}
/* styles for the overlay close button */
div#lbOverlay div#lbOverlayClose {
position: fixed;
top: 30px;
z-index: 2;
}
}