Skip to content

Commit f28582e

Browse files
committed
positioning
1 parent 005aa07 commit f28582e

File tree

3 files changed

+66
-4
lines changed

3 files changed

+66
-4
lines changed

Lecture04/positioning/index.html

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7+
<title>Document</title>
8+
<link rel="stylesheet" href="style.css">
9+
</head>
10+
<body>
11+
<div id="div0">
12+
<div id="div1">Div 1</div>
13+
</div>
14+
<div id="div2">Div 2</div>
15+
<div id="div3">Div 3</div>
16+
<div id="div4">Div 4</div>
17+
<div id="div5">Div 5</div>
18+
<div id="div6">Div 6</div>
19+
<div id="div7">Div 7</div>
20+
<div id="div8">Div 8</div>
21+
<div id="div9">Div 9</div>
22+
<div id="div10">Div 8</div>
23+
<div id="div11">Div 9</div>
24+
</body>
25+
</html>

Lecture04/positioning/style.css

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
div {
2+
height: 100px;
3+
width: 500px;
4+
background-color: bisque;
5+
text-align: center;
6+
/* margin: 20px; */
7+
border: solid 2px black;
8+
}
9+
10+
/* #div2 {
11+
position: relative;
12+
top: -100px;
13+
right: 100px;
14+
} */
15+
16+
/* #div3 {
17+
position: fixed;
18+
top: 20px;
19+
right: 20px;
20+
} */
21+
22+
/* #div4 {
23+
position: sticky;
24+
top: 10px;
25+
left: 60%;
26+
} */
27+
28+
#div0 {
29+
position: relative;
30+
/* top: 10px; */
31+
}
32+
33+
#div1 {
34+
position: absolute;
35+
/* top: 20px; */
36+
/* left: 20px; */
37+
}

Lecture04/transforms/style.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ div {
2222
transform: skew(20deg)
2323
} */
2424

25-
#div1 {
25+
/* #div1 {
2626
transform: translateX(70px) rotateY(50deg)
27-
}
27+
} */
2828

29-
#div2 {
29+
/* #div2 {
3030
transform: rotateY(50deg) translateX(70px)
31-
}
31+
} */

0 commit comments

Comments
 (0)