-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path17_flex_align.html
46 lines (42 loc) · 1.06 KB
/
17_flex_align.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flex Align</title>
<style>
#container {
display: flex;
/* Used to control spacing between flex items */
justify-content: center;
background: #555;
height: 600px;
/* Options:
flex start
flex end
center
baseline
stretch */
align-items: baseline;
}
.item {
background: #f4f4f4;
border: #ccc 1px solid;
text-align: center;
padding: .75rem;
margin: .75rem;
flex-basis: 300px;
}
.item-2 {
align-self: center;
}
</style>
</head>
<body>
<div id="container">
<div class="item item-1"><h3>Item 1</h3></div>
<div class="item item-2"><h3>Item 2</h3></div>
<div class="item item-3"><h3>Item 3</h3></div>
</div>
</body>
</html>