-
Notifications
You must be signed in to change notification settings - Fork 598
/
07_dom.html
166 lines (152 loc) · 4.02 KB
/
07_dom.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WEB APIs</title>
<style>
:root {
--yellow-color: #F7DF1E;
--dark-color: #222;
}
.cards {
border: thin solid var(--dark-color);
padding: 1rem;
}
.card {
display: inline-block;
background-color: var(--dark-color);
color: var(--yellow-color);
}
.card figcaption {
padding: 1rem;
}
.rotate-45 {
transform: rotate(45deg);
}
.rotate-135 {
transform: rotate(135deg);
}
.opacity-80 {
opacity: .8;
}
.sepia {
filter: sepia(1);
}
.eventos-flujo div {
padding: 4rem;
font-size: 2rem;
text-align: center;
}
.uno {
background-color: yellow;
}
.dos {
background-color: gold;
}
.tres {
background-color: lightyellow;
}
</style>
</head>
<body>
<h1>WEB APIs</h1>
<h2>DOM: Document Object Model</h2>
<h2>BOM: Browser Object Model</h2>
<h2>CSSOM: CSS Object Model</h2>
<h2>WEB APIs</h2>
<ul>
<li>Eventos</li>
<li>Forms</li>
<li>AJAX - Fetch</li>
<li>History</li>
<li>Web Storage</li>
<li>Geolocation</li>
<li>Drag & Drop</li>
<li>Indexed DB</li>
<li>Canvas</li>
<li>MatchMedia</li>
<li>etc..</li>
</ul>
<br>
<hr>
<br>
<h3>Manejo del DOM</h3>
<p id="que-es">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quidem, laboriosam cum quod, perferendis eveniet pariatur
facere doloribus adipisci consequatur totam est dolorum vero nisi voluptate porro explicabo quo necessitatibus
blanditiis.
</p>
<nav id="menu">
<ul>
<li><a href="#">Sección 1</a></li>
<li><a href="#">Sección 2</a></li>
<li><a href="#">Sección 3</a></li>
<li><a href="#">Sección 4</a></li>
<li><a href="#">Sección 5</a></li>
</ul>
</nav>
<input type="text" name="nombre" placeholder="Nombre">
<a class="link-dom" data-id="1" data-description="Document Object Model" href="dom.html"
style="background-color: #F7DF1E; color: #222;">DOM</a>
<section class="cards">
<figure class="card">
<img src="https://placeimg.com/200/200/tech" alt="Tech">
<figcaption>Tech</figcaption>
</figure>
<figure class="card">
<img src="https://placeimg.com/200/200/animals" alt="Animals">
<figcaption>Animals</figcaption>
</figure>
<figure class="card">
<img src="https://placeimg.com/200/200/arch" alt="Architecture">
<figcaption>Architecture</figcaption>
</figure>
<figure class="card">
<img src="https://placeimg.com/200/200/people" alt="People">
<figcaption>People</figcaption>
</figure>
<figure class="card">
<img src="https://placeimg.com/200/200/nature" alt="Nature">
<figcaption>Nature</figcaption>
</figure>
</section>
<template id="template-card">
<figure class="card">
<img>
<figcaption></figcaption>
</figure>
</template>
<h3>Eventos en JavaScript</h3>
<h4>Manejadores de Eventos</h4>
<button onclick="holaMundo()">Evento con atributo HTML</button>
<br><br>
<button id="evento-semantico">Evento con manejador semántico</button>
<br><br>
<button id="evento-multiple">Evento con manejador múltiple</button>
<br><br>
<button id="evento-remover">Removiendo eventos con manejadores múltiples</button>
<h4>Flujo de Eventos</h4>
<section class="eventos-flujo">
<div class="uno">
1
<div class="dos">
2
<div class="tres">
3
<br>
<a href="https://jonmircha.com/" target="_blank" rel="noopener">jonmircha.com</a>
</div>
</div>
</div>
</section>
<h3 style="width: 2000px;">Manejo del BOM</h3>
<button id="abrir-ventana">Abrir Ventana</button>
<br><br>
<button id="cerrar-ventana">Cerrar Ventana</button>
<br><br>
<button id="imprimir-ventana">Imprimir Ventana</button>
<br><br>
<script src="js/dom.js"></script>
</body>
</html>