-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCSSFlexbox.html
More file actions
53 lines (49 loc) · 1.27 KB
/
CSSFlexbox.html
File metadata and controls
53 lines (49 loc) · 1.27 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
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Ejemplo Flexbox</title>
<style>
/* Estilos de Flexbox */
.contenedor {
display: flex;
flex-wrap: wrap;
align-content: space-around;
justify-content: space-around;
align-items: center;
height: 100vh; /* Ocupa toda la altura del viewport */
background-color: #f0f0f0;
gap: 40px;
}
.caja {
background-color: #4caf50;
color: white;
padding: 20px;
font-size: 20px;
text-align: center;
border-radius: 8px;
width: 200px;
}
/* Puedes experimentar con estas propiedades */
.caja:nth-child(2) {
background-color: #2196f3;
align-self: center;
}
.caja:nth-child(3) {
background-color: #ff5722;
align-self: flex-end;
}
</style>
</head>
<body>
<div class="contenedor">
<div class="caja">Caja 1</div>
<div class="caja">Caja 2</div>
<div class="caja">Caja 3</div>
<div class="caja">Caja 4</div>
<div class="caja">Caja 5</div>
<div class="caja">Caja 6</div>
</div>
</body>
</html>