-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path14-bubbling.html
78 lines (69 loc) · 1.55 KB
/
14-bubbling.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
<!DOCTYPE html>
<html lang="ru">
<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>Всплытие событий</title>
<!-- <link rel="stylesheet" href="/css/styles.css" /> -->
<style>
#parent,
#child,
#inner-child {
margin: 16px;
padding: 16px;
border: 1px solid #ffc107;
border-radius: 4px;
color: #fff;
font-weight: 500;
font-size: 18px;
}
#parent {
background-color: #673ab7;
}
#child {
background-color: #448aff;
}
#inner-child {
background-color: #009688;
}
#parent2,
#child2,
#descendant {
margin: 16px;
padding: 16px;
border: 1px solid #4dff07;
border-radius: 4px;
color: #fff;
font-weight: 500;
font-size: 18px;
}
#parent2 {
background-color: #ef2020;
}
#child2 {
background-color: #e2a2ff;
}
#descendant {
background-color: #ff8800;
}
</style>
</head>
<body>
<div id="parent">
PARENT
<div id="child">
CHILD
<div id="inner-child">INNER-CHILD</div>
</div>
</div>
<div id="parent2">
Parent2
<div id="child2">
Child2
<div id="descendant">Descendant</div>
</div>
</div>
<script src="./app/14-bubbling.js" type="module"></script>
</body>
</html>