-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path14.propiedades.css
More file actions
300 lines (264 loc) · 4.77 KB
/
14.propiedades.css
File metadata and controls
300 lines (264 loc) · 4.77 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
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
/* Propiedades CSS */
:root{
font-size: 16px; /* */
}
body {
padding: 1rem; /* por defecto 1em = 16px */
}
h1 {
font-size: 2rem;
}
h3 {
margin: 1em auto;
}
/* max-width */
div {
margin: 0.5em 0;
padding: 0.5em;
/* Importante para que no desborde del width o height establecido: */
box-sizing: border-box;
}
.div-1, .div-2, .div-3 {
border: 1px solid brown;
}
/*
width => max, min
height => max, min
*/
.div-1{
max-width: 200px;
width: 500px;
}
.div-2 {
max-width: 100%;
width: 80%;
}
.div-3 {
min-width: 200px;
width: 300px;
max-height: 200px;
height: 300px;
}
/* position */
/* por defecto: */
.relative {
position: relative;
border: 1px solid black;
}
.absolute {
position: absolute;
background-color: tomato;
bottom: 40px;
right: 0;
}
.fixed {
position: fixed;
width: 20%;
background-color: yellow;
bottom: 0;
right: 0;
}
.sticky {
position: sticky;
width: 20%;
background-color: lightgray;
bottom: 0;
left: 0;
}
/* z-index */
#container img {
z-index: -1;
}
#container h3 {
display: inline-block;
position: absolute;
color:gray;
text-shadow: 1px 1px 2px white;
z-index: 1;
margin: 0 auto;
text-align: center;
}
/* contenedor de <video> y <h2> */
#video {
width:30%;
margin: 0 auto;
display: flex;
align-items: end;
justify-content: center;
}
#video video {
z-index: -1;
}
#video h2 {
position: absolute;
color: white;
z-index: 0;
}
#video-container {
/* position: fixed; */
/* top: 0; */
/* left: 0; */
width: 100%;
height: auto;
overflow: hidden;
z-index: -1;
}
#video-container iframe {
width: 560px;
height: 315px;
z-index: -1;
pointer-events: none;
}
#iframe-overlay {
display: none;
position: absolute;
/* top: 0; */
/* left: 0; */
width: 560px;
height: 315px;
background-color: rgba(0, 0, 0, 0.75); /* Fondo semitransparente */
pointer-events: none; /* Deshabilitar eventos de clic */
z-index: 999;
}
/* Overflow */
.overflow {
width: 100%;
max-width: 100%;
height: 100px;
max-height: 300px;
overflow-y: auto;
border: 1px solid black;
}
/* Float */
.clearfix {
overflow: auto;
}
.float-right {
float: right;
width: 25vw;
min-width: 170px;
height: auto;
aspect-ratio: 1900 / 1069;
background-color: lightblue;
}
* {
box-sizing: border-box;
}
.box, .box-2 {
float: left;
width: 33.33%;
padding: 1rem;
}
.clearfix::after {
content: "";
clear: both;
display: table;
}
.box-2 {
height: 500px;
}
.img-container {
float: left;
width: 33.33%;
padding: 5px;
}
.img-container img {
width: 100%;
min-height: 250px;
height: 250px;
}
.img-clearfix::after {
content: "";
clear: both;
display: table;
}
.inline-block-container {
width: 100%;
padding: 1rem;
/* Ignoe los espacios entre etiquetas para que no tengamos que colocarlas todas en la misma línea sin indentación: */
/* Más info en: https://developer.mozilla.org/es/docs/Web/CSS/white-space */
white-space: nowrap;
}
.inline-block-container img {
display: inline-block;
width:20%;
height: auto;
}
/* Align */
.align-container {
width: 100%;
padding: 1rem;
margin: 0 auto;
text-align: center;
}
.align-container img, .align-container-right img {
display: inline-block;
width: 20%;
height: auto;
}
.align-container h3, .align-container p {
display: inline-block;
width: 20%;
text-align: left;
}
.align-container-right {
width: min-content;
margin-right:0;
margin-left: auto;
border: 1px solid black;
}
.align-container-right img {
display: inline-block;
width: 100%;
height: auto;
}
.align-container-left {
width: min-content;
margin-left: 0;
margin-right: auto;
border: 1px solid black;
}
.align-container-left img {
display: inline-block;
width: 100%;
height: auto;
}
/* CSS Combinator */
.combinator {
width: 100%;
padding: 1rem;
margin: 0 auto;
border: 1px solid black;
box-sizing: border-box;
}
/* descendant selector => selector de descendiente */
/* Seleccionamos los <p> dentro del <div> de clase "combinator" */
.combinator p {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: yellow;
}
.combinator > p {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: lightblue;
}
/* Cualquier <a> dentro de clase "combinator" se selecciona: */
.combinator a {
color: red;
}
/* Solo los <a> child directos de "combinator" se seleccionan: */
.combinator > a {
color: blue;
text-decoration: none;
}
/* Selecciona solo la primera coincidencia después del primer elemento: */
.combinator p + p {
color: green;
font-weight: bold;
text-decoration: underline;
}
/* El selector de hermano general selecciona todas las coincidencias independiente de la posición */
li ~ li {
color: purple;
font-weight: bold;
font-style: italic;
}