-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbublCapturing.html
More file actions
59 lines (50 loc) · 1.33 KB
/
bublCapturing.html
File metadata and controls
59 lines (50 loc) · 1.33 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
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="Bubbling&Capturing.js" defer></script>
<title>Event Bubbling | Capturing | Delegation</title>
<style>
* {
padding: 0%;
margin: 0%;
position: relative;
}
body {
font-family: cursive;
display: flex;
}
main{
display: flex;
justify-content: center;
align-items: center;
}
.box {
min-width: 100px;
min-height: 100px;
cursor: pointer;
border: 1px solid black;
padding: 3rem;
margin: 3rem;
cursor: pointer;
font-weight: bold;
text-align: center;
}
.grandparent {background-color: rgb(255, 93, 93);}
.parent {background-color: greenyellow;}
.child {background-color: rgb(0, 195, 255);}
</style>
</head>
<body>
<main>
<div class="grandparent box">grandparent
<div class="parent box">parent
<div class="child box">child
</div>
</div>
</div>
</main>
</body>
</html>