-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathposition.html
More file actions
78 lines (70 loc) · 1.62 KB
/
position.html
File metadata and controls
78 lines (70 loc) · 1.62 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
section {
width: 90%;
margin: 5%;
border: solid 2px black;
}
div {
width: 200px;
height: 200px;
margin: 10px;
border: solid 2px black;
}
.static {
background-color: gold;
top: 0;
bottom: 0;
right: 0;
left: 0;
z-index: 1;
}
.fixed {
background-color: chartreuse;
top: 0;
bottom: 0;
right: 0;
left: 0;
z-index: 1;
}
.relative{
background-color: brown;
top: 0;
bottom: 0;
right: 0;
left: 0;
z-index: 1;
}
.absolute{
background-color: aqua;
top: 0;
bottom: 0;
right: 0;
left: 0;
z-index: 1;
}
.sticky {
background-color: rebeccapurple;
top: 0;
bottom: 0;
right: 0;
left: 0;
z-index: 1;
}
</style>
</head>
<body>
<section>
<div class="static"></div>
<div class="fixed"></div>
<div class="relative"></div>
<div class="absolute"></div>
<div class="sticky"></div>
</section>
</body>
</html>