-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathposition.html
74 lines (74 loc) · 2.03 KB
/
position.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
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
<html>
<head>
<style>
#pos-abs{
position: absolute;
top: 40px;
width: 240px;
height: 120px;
background-color: red;
}
#pos-rel{
position: relative;
left: 80px;
width: 480px;
height: 240px;
background-color: blue;
}
#pos-sticky{
position: sticky;
padding: 40px 30px;
top: 10px;
z-index: 9;
background-color: indianred;
}
button#btn_call{
background-color: bisque;
color: gray;
padding: 10px 20px;
position: fixed;
bottom: 0;
right: 0;
}
</style>
</head>
<body>
<div id="pos-sticky">
<p>This is sticky paragraph</p>
</div>
<div>
<p>This is for body example</p>
</div>
<div id="pos-rel">
<p>This is my first paragraph</p>
<div id="pos-abs">
<h1>This is Heading Element</h1>
</div>
</div>
<div id="pos-rel">
<p>This is my first paragraph</p>
<div id="pos-abs">
<h1>This is Heading Element</h1>
</div>
</div>
<div id="pos-rel">
<p>This is my first paragraph</p>
<div id="pos-abs">
<h1>This is Heading Element</h1>
</div>
</div>
<div id="pos-rel">
<p>This is my first paragraph</p>
<div id="pos-abs">
<h1>This is Heading Element</h1>
</div>
</div>
<div id="pos-rel">
<p>This is my first paragraph</p>
<div id="pos-abs">
<h1>This is Heading Element</h1>
</div>
</div>
<button id="btn_call">Call Me</button>
</body>
</html>