-
Notifications
You must be signed in to change notification settings - Fork 0
/
nov12_12_5Relative.html
58 lines (46 loc) · 1.49 KB
/
nov12_12_5Relative.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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- meta태그란 로봇들에게 노출하기위한 것 -->
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- viewport란 일반기기라는 말. 반응형 -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>12-4 position_relative</title>
<!-- https://luckyguystory.tistory.com/58 -->
<style>
#red {
width: 100px;
height: 100px;
background-color: red;
}
#yellow{
width: 400px; height: 400px;
position: relative;
background-color: yellow;
top: 100px; left: 100px;
}
#green{
width: 100px;
height: 100px;
background-color: #00ff00;
position: relative;
top: 0; left: 100px;
}
#blue{
width: 100px;
height: 100px;
background-color: #0000ff;
position: relative;
top: 100px; left: 100px;
}
</style>
</head>
<body>
<div id="red"></div>
<div id="yellow">
<div id="green"></div>
<div id="blue"></div>
</div>
</body>
</html>