-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathPopup window.html
More file actions
98 lines (81 loc) · 1.72 KB
/
Popup window.html
File metadata and controls
98 lines (81 loc) · 1.72 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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {font-family: Arial, Helvetica, sans-serif;}
.modal {
display: none;
position: fixed;
z-index: 1;
padding-top: 100px;
left: 0;
top: 0;
width: 100%;
height:100%;
background-color: rgb(182, 186, 187);
float: right;
}
.modal-content {
background-color: #ffffff;
margin: auto;
padding: 10px;
border: 1px solid rgb(250, 3, 3);
width: fit-content;
height: fit-content;
border-radius: 25px
}
#images{
display: inline-block;
margin: 10px;
}
@media screen and (max-width:600px){
#images
{
display: block;
}
}
/* The Close Button */
.close {
color: #aaaaaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
</style>
</head>
<body>
<button id="myBtn">Open Modal</button>
<div id="myModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<div id="Images">
<img src="logo.png " id="profile" alt="Profile Pic of Student">
<img src="logo.png" id="qrimage" alt="QR image">
<img src="df" id="gif" >
</div>
</div>
</div>
<script>
var modal = document.getElementById("myModal");
var btn = document.getElementById("myBtn");
var span = document.getElementsByClassName("close")[0];
btn.onclick = function() {
modal.style.display = "inline-block";
}
span.onclick = function() {
modal.style.display = "none";
}
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
</script>
</body>