-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclickable-image.css
More file actions
49 lines (44 loc) · 972 Bytes
/
clickable-image.css
File metadata and controls
49 lines (44 loc) · 972 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
/* copy from https://blog.walterlv.com/post/create-click-to-zoom-image-for-web-pages.html */
.image-cover-modal {
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
position: fixed;
z-index: 30;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgb(0,0,0);
background-color: rgba(0,0,0,0.9);
transition: opacity ease 0.3s;
pointer-events: none;
}
.model-shown {
pointer-events: all;
opacity: 1;
}
.image-cover-modal-content {
display: block;
max-width: 80%;
max-height: 80%;
}
#image-cover-caption {
display: block;
position: absolute;
width: 100%;
height: 3rem;
bottom: 0;
line-height: 3rem;
text-align: center;
color: #fff;
background: rgba(255, 255, 255, 0.33);
}
@media only screen and (max-width: 45rem){
.image-cover-modal-content {
max-width: 100%;
max-height: 100%;
}
}