This repository was archived by the owner on Jan 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathposition.html
More file actions
83 lines (71 loc) · 1.71 KB
/
Copy pathposition.html
File metadata and controls
83 lines (71 loc) · 1.71 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Position</title>
<style>
div {
font-size: 60px;
padding: 30px;
border: solid 5px #222;
color: #fff;
}
.static {
top: 100px;
left: 100px;
background-color: steelblue;
}
.fixed {
position: fixed;
bottom: 30px;
right: 0px;
background-color: tomato;
}
.relative1 {
position: relative;
left: 50px;
top: 5px;
background-color: seagreen;
}
.absolute1 {
position: absolute;
left: 350px;
top: 120px;
background-color: violet;
}
.relative2 {
position: relative;
left: 250px;
top: 2000px;
width: 200px;
height: 200px;
background-color: slategrey;
}
.absolute2 {
position: absolute;
left: 10px;
top: 10px;
width: 20px;
height: 20px;
background-color: orange;
}
.sticky {
position: -webkit-sticky; /* safari */
position: sticky;
background-color: #777;
top: 10px;
}
</style>
</head>
<body>
<div class="static">Static (Padrão)</div>
<div class="fixed">Fixed</div>
<div class="relative1">Relative</div>
<div class="absolute1">Absolute</div>
<div class="relative2">
<div class="absolute2"></div>
</div>
<div class="sticky">Sticky</div>
<p style="padding-bottom: 2000px;">Opa</p>
</body>
</html>