-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcss04_position.html
More file actions
42 lines (37 loc) · 1.8 KB
/
css04_position.html
File metadata and controls
42 lines (37 loc) · 1.8 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>위치 및 레이아웃 관련 속성</title>
<style>
.lst{list-style: none; clear: both; width: 1290px;}
.lst::after{content:""; display:block; width:100%; clear: both;}
.lst li{width: 300px; height: 340px; background-color: #fff; box-sizing: border-box; border: 1px solid black;}
.lst li:nth-child(4n){margin-right:0;}
.imgbox{width: 200px;height: 200px;background-color: navy; margin: 24px auto;}
.cate_tit{padding-left: 50px;}
.cate_comment{padding-left: 50px;}
.pos1 .lst li:nth-child(3){clear:both;}
.pos2 .lst li{position:relative;}
.pos2 .lst li:nth-child(2){left: 50px; top: 50px;}
.pos2 .lst li:nth-child(3){left: -50px; top: -50px;}
.po3 .lst{position:relative;}
.pos3 .lst li{position:absolute;}
.po3 .lst li:nth-child(1){z-index:100; left: -50px; top: -50px;}
.po3 .lst li:nth-child(2){z-index:99; left: 50px; top: 50px;}
.po3 .lst li:nth-child(3){z-index:98; left: 150px; top: 150px;}
.po3 .lst li:nth-child(4){z-index:97; left: 250px; top: 250px;}
.po3 .lst li:nth-child(5){z-index:96; left: 350px; top: 350px;}
.po3 .lst li:nth-child(6){z-index:95; left: 450px; top: 450px;}
.pos4 .lst li{position:fixed; z-index: 999;}
.pos4 .lst li:first-child{right: 50px; top: 50px;}
.pos4 .lst li:nth-child(2){left: 50px; top: 50px;}
.pos4 .lst li:nth-child(3){right: 50px; bottom: 50px;}
.pos4 .lst li:nth-child(4){left: 50px; bottom: 50px;}
.pos4 .lst li:nth-child(5), .pos4 .lst li:nth-child(6){display: none;}
</style>
</head>
<body>
</body>
</html>