-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathposition.html
More file actions
57 lines (56 loc) · 1.14 KB
/
position.html
File metadata and controls
57 lines (56 loc) · 1.14 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Episode 13</title>
</head>
<body>
<!-- <div class="navbar">SEKOLAHDIGITAL</div> -->
<div class="box">
<div class="satu">relative</div>
<div class="dua">absolute</div>
<div class="tiga">fixed</div>
</div>
</body>
<style>
/* .navbar {
position: fixed;
font-size: 18px;
top: 0;
left: 0;
width: 100%;
height: 50px;
color: white;
background-color: black;
} */
.box {
width: 300px;
height: 300px;
border: 3px solid black;
color: initial;
}
.box .satu {
position: relative;
top: 200px;
right: 30px;
width: 100px;
height: 100px;
background-color: red;
}
.box .dua {
position: absolute;
top: 300px;
left: 100px;
width: 100px;
height: 100px;
background-color: green;
}
.box .tiga {
position: fixed;
width: 100px;
height: 100px;
background-color: black;
}
</style>
</html>