-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathposition-2.html
53 lines (44 loc) · 1.11 KB
/
position-2.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.swiming {
position: relative;
}
/* .swiming div {
border: 1px dashed palevioletred;
width: 200px;
} */
#boy {
position: absolute;
z-index: 2;
top: -5px;
}
#ring {
position: absolute;
z-index: 1;
top: 30px;
}
#water {
position: absolute;
top: 50px;
}
</style>
</head>
<body>
<section>
<h1>This is my header</h1>
<h1>I am learning position</h1>
<h2>I am in a higher position</h2>
</section>
<section class="swiming">
<div id="boy"><img src="images/boy.svg" alt=""></div>
<div id="ring"><img src="images/ring.svg" alt=""></div>
<div id="water"><img src="images/water.svg" alt=""></div>
</section>
</body>
</html>