forked from YOSOFT/html5-grupo-66
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathposicionamiento-absoluto.html
43 lines (42 loc) · 1018 Bytes
/
posicionamiento-absoluto.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
<!DOCTYPE html>
<html lang="es">
<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>Posicionamiento absoluto</title>
<style>
body{
height: 3000px;
background: #ccc; }
.caja{
width: 100px;
height: 100px;
margin: 10px;
}
.roja{
background-color: tomato;
position: absolute;
left: 150px;
bottom: 150px;
}
.azul{
background-color: blue;
}
.contenedor {
width: 400px;
height: 400px;
background-color: #6e6e6e;
margin-top: 150px;
position: absolute;
bottom: 10px;
}
</style>
</head>
<body>
<div class="contenedor">
<div class="caja roja"></div>
</div>
<div class="caja azul"></div>
</body>
</html>