-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
47 lines (44 loc) · 1.23 KB
/
index.html
File metadata and controls
47 lines (44 loc) · 1.23 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
<title>syj lightbox test page</title>
<script src="js/simplebox.js" type="text/javascript"></script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
var box = new SimpleBox("#lightbox");
document.getElementById("control").addEventListener('click', function() {
box.show();
});
});
</script>
<style type="text/css">
.center {
text-align: center;
padding: 1px;
}
#control {
border: 1px solid red;
padding: 6px;
-moz-border-radius: 20%;
-webkit-border-radius: 20%;
}
#lightbox {
width: 40%;
margin: auto;
background-color: white;
padding-top: 30px;
padding-bottom: 30px;
border: 1px dotted black;
}
</style>
</head>
<body>
<p class="center">This document is a simple lightbox example</p>
<p class="center"><span id="control">clic here to show lightbox</span></p>
<div id="lightbox" class="center">
<p>lightbox content</p>
<p>lightbox can contain <em>any html</em></p>
</div>
</body>
</html>