-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.html
More file actions
42 lines (39 loc) · 929 Bytes
/
popup.html
File metadata and controls
42 lines (39 loc) · 929 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
<style>
#popup {
display: none;
width: 400px;
height: 400px;
border-radius: 50%;
background-color: #fff;
border: 1px solid #ccc;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 20px;
text-align: left;
z-index: 1000;
}
#closeBtn {
position: absolute;
top: 10px;
right: 10px;
font-size: 24px;
cursor: pointer;
color: grey;
}
</style>
<div ondblclick="clicpopup(0)" style="cursor:pointer">cliclic</div>
<div id="popup">
<span id="closeBtn" onclick="clicpopup(1)">✖</span>
<p>Contenu du div</p>
<p>hhhhh</p>
<p> jjjjj</p>
</div>
<script>
const popup = document.getElementById('popup');
function clicpopup(action) {
popup.style.display = action==1 ? 'none' : 'block';
}
</script>