-
Notifications
You must be signed in to change notification settings - Fork 2
/
TestSameLayer.html
60 lines (55 loc) · 1.25 KB
/
TestSameLayer.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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<style>
.container {
text-align: center;
/* max-width: 100vw; */
margin: 60px;
font-size: 50px;
}
.p {
position:absolute;
top: 20px;
left: 50px;
font-size: 100px;
word-break: break-all;
z-index:1;
background-color:red;
}
.p1 {
position:absolute;
top: 30px;
left: 20px;
font-size: 100px;
word-break: break-all;
z-index:3;
background-color:yellow;
}
</style>
<body>
<div class="container">
</div>
<div id="text" class="p">sadfadfadfadfadfa</div>
<img id="preview">
<div id="text2" class="p1">qqqqqqqqqqqqqqqqqqqq</div>
<mytag id = "mytag"
style="position:absolute;background-color:green;width:700px; height:1000px;">
占位的标签
</mytag>
</body>
<script>
var div = document.getElementById('mytag');
div.addEventListener('touchstart', test);
div.addEventListener('touchend', test);
div.addEventListener('touchcancel', test);
div.addEventListener('touchleave', test);
div.addEventListener('touchmove', test);
function test(e) {
var test = e.currentTarget;
console.log("Hi, div clicked!");
}
console.log("This is the test div page");
</script>
</html>