回答編集履歴
2
調整
test
CHANGED
@@ -2,8 +2,19 @@
|
|
2
2
|
|
3
3
|
```html
|
4
4
|
<style>
|
5
|
+
#mdl{
|
5
|
-
|
6
|
+
postion:relative;
|
7
|
+
border:0;
|
8
|
+
}
|
9
|
+
#mdl .close{
|
6
|
-
|
10
|
+
position:absolute;
|
11
|
+
top:0;
|
12
|
+
right:0;
|
13
|
+
}
|
14
|
+
#mdl .close:hover{
|
15
|
+
background-Color:gray;
|
16
|
+
cursor:pointer;
|
17
|
+
}
|
7
18
|
</style>
|
8
19
|
<script>
|
9
20
|
const ce = new CustomEvent("HTMLEvents");
|
1
調整
test
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
mdl.showModal();
|
15
15
|
mdl.dispatchEvent(ce);
|
16
16
|
}
|
17
|
-
if(target.matches('#mdl .close')){
|
17
|
+
if(target.matches('#mdl .close,#mdl a')){
|
18
18
|
mdl.close();
|
19
19
|
}
|
20
20
|
});
|