-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodal.html
104 lines (95 loc) · 2.46 KB
/
modal.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Modal</title>
<style>
* {
margin: 0;
padding: 0;
}
li{
list-style: none;
}
button {
background-color: #953523;
padding: 13px;
border: 3px solid #ccc;
border-radius: 10px;
color: white;
margin-right: 10px;
cursor: pointer;
outline: none;
}
.cover {
width: 100%;
height: 100%;
position: absolute;
background-color: #ccc;
top: 0;
left: 0;
opacity: 0.6;
}
.dialog {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 3;
background-color: lightgray;
min-width: 300px;
border-radius: 10px;
}
.header {
padding: 10px;
background-color: cadetblue;
border-radius: 10px 10px 0 0;
position: relative;
}
.btn-close {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
}
.content {
padding: 30px 10px;
}
.footer {
text-align: center;
}
.footer button {
padding: 10px;
display: inline-block;
}
</style>
</head>
<body>
<div class="btn-wrap">
<button class="open1">按钮一</button>
<button class="open2">按钮二</button>
<button class="open3">按钮三</button>
<button class="open4">按钮四</button>
<button class="open5">按钮五</button>
</div>
<!--<div class="cover"></div>
<div class="dialog">
<div class="header">
<h3>Modal</h3>
<span class="btn-close">X</span>
</div>
<div class="content">
hello world!!!!!
</div>
<div class="footer">
<button class="confirm">OK</button>
<button class="cancel">CANCEL</button>
</div>
</div>-->
</body>
<script src="js/jquery-1.11.2.js"></script>
<script src="js/modal.js"></script>
</html>