-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
76 lines (65 loc) · 2.17 KB
/
index.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/style.css">
<title>Document</title>
<!-- explain difference between em and rem
em is immediate parent font-size which is 42px
rem is to root html font size -->
<!-- <div>
<div style="font-size: 42px">
<h1 style="font-size: 1em">em</h1>
<h1 style="font-size: 1rem">rem</h1>
</div>
</div> -->
</head>
<body>
<div class="banner">
<div class="container">
<h1>hello</h1>
<p>Hello I am laymui</p>
<div style="margin-bottom: 4rem;margin-top: 4rem">
<a href="#" class="btn btn-block">Click me</a>
</div>
<div style="height: 200px; background:blueviolet">
<img src="https://github.com/laymui.png" class="avatar avatar-position">
</div>
</div>
<!-- space-between is you want to spread it out as much as possible -->
<div class="container" style="display: flex; gap: 2rem; flex-wrap: wrap; justify-content: space-between;">
<div class="card card-grow-01" >
<h1>le wagon shanghai</h1>
</div>
<div class="card card-grow-02">
<h1>le wagon singapore</h1>
</div>
<div class="card card-grow-01" style="display:flex;flex-direction:column;justify-content: space-between;">
<h1>le wagon rio</h1>
</div>
<div class="card card-grow-03">
<h1>le wagon indonesia</h1>
</div>
<div class="card card-grow-01">
<h1>le wagon japan</h1>
</div>
</div>
</div>
<div style="height: 48px; width: 200px; background: blue;">
<div style="position: absolute; right: 0; width: 100px;">
this does nothing because theis element with absolute
positioning
does
not know it has to take reference from the blue rectangle
</div>
</div>
<div style="height: 48px; width: 200px; background: yellow; position:relative;">
<div style="position: absolute; right: 0; width: 100px;">
this correctly positions because the parent
element has
relative
</div>
</div>
</body>
</html>