-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtut25.html
More file actions
50 lines (46 loc) · 1.41 KB
/
tut25.html
File metadata and controls
50 lines (46 loc) · 1.41 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
<!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>
.container{
border:2px solid black;
background-color: khaki;
height: 3444px;
}
/* CSS positon: static(default),relative,absolute,fixed, sticky */
.box{
display: inline-block;
border: 2px solid red;
width: 150px;
height: 150px;
margin:2px;
}
#box3{
/* relative: Positions the element relative to its normal positon and will leave a gap at its normal position*/
/* position: relative; */
/* absolute: Positions the element relative to the positon of its first parent*/
/* position: absolute; */
/* top: 34px;
left: 134px; */
/* fixed: Positions the element relative to the browser window; */
/* position: fixed;
right: 4px;
bottom: 2px */
/* sticky: Positions the element relative to the users scroll position */
position:sticky ;
top:3px;
}
</style>
</head>
<body>
<div class="container">
<div class="box" id="box1">1</div>
<div class="box" id="box2">2</div>
<div class="box" id="box3">chat with us</div>
<div class="box" id="box4">4</div>
</div>
</body>
</html>