-
Notifications
You must be signed in to change notification settings - Fork 0
/
tut24.html
50 lines (48 loc) · 1.73 KB
/
tut24.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
<!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>
/*position = static(default), absolute, relative, fixed, sticky*/
.container{
border: 2px solid black;
background-color: khaki;
height: 3444px;
}
.box{
display: inline-block;
border: 2px solid red;
width: 150px;
height: 150px;
margin: 2px;
}
#box3{
/*relative = relative to its normal position and will leave a gap to its normal position*/
/*position: relative;*/
/*absolute = relative to its normal position of its first parent*/
/*position: absolute;*/
/*top: 34px;
left: 134px;*/
/*fixed: relative to the browser window*/
/*position: fixed;
right: 4px;
bottom: 2px;*/
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>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Just lovely.... <a href="https://t.co/GNLRkWw8FX">pic.twitter.com/GNLRkWw8FX</a></p>— Universal-Sci (@universal_sci) <a href="https://twitter.com/universal_sci/status/1299169221910376448?ref_src=twsrc%5Etfw">August 28, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>
</div>
</body>
</html>