-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflexbox-fun-lec.html
More file actions
49 lines (47 loc) · 1.39 KB
/
flexbox-fun-lec.html
File metadata and controls
49 lines (47 loc) · 1.39 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
43
44
45
46
47
48
49
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Flexbox Basics Examples</title>
<style>
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: Helvetica, sans-serif;
font-weight: bold;
}
.flex-container {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
width: 100%;
height: 500px;
border: 3px solid goldenrod;
}
.flex-item {
background: #BFD45D;
border: 2px solid #F9EFD6;
padding: 1em;
}
</style>
</head>
<body>
<div class="flex-container">
<div style="height: 20px; flex-grow:2" class="flex-item">Item 1</div>
<div class="flex-item">Item 2</div>
<div style="height: 20px" class="flex-item">Item 3</div>
<div class="flex-item">Item 4</div>
<div style="height: 20px; flex-grow: 1" class="flex-item">Item 5</div>
<div class="flex-item">Item 6</div>
<div style="height: 20px" class="flex-item">Item 7</div>
<div class="flex-item">Item 8</div>
<div style="height: 90px; flex-grow:3" class="flex-item">Item 9</div>
<div class="flex-item">Item 10</div>
<div style="height: 200px" class="flex-item">Item 11</div>
<div class="flex-item">Item 12</div>
</div>
</body>
</html>