-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtutorial-15.html
61 lines (53 loc) · 1.38 KB
/
tutorial-15.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flex Box</title>
<style>
h1{
text-align: center;
}
.container {
border: 3px solid darkgrey;
background-color: lightsteelblue;
display: flex;
height: 550px;
width: 100%;
}
.item {
border: 2px solid rgb(193, 97, 193);
padding: 22px;
margin: 22px;
width: 150px;
height: 200px;
color: rgb(238, 232, 223);
background-color: rgb(20, 42, 82);
}
#item1 {
flex-grow: 3;
}
#item2 {
flex-grow: 3;
flex-shrink: 3;
flex-basis: 200px;
}
#item3{
flex-shrink: 2;
/* flex shorthand */
/* flex: 2 2 230px; */
/* align-self: flex-start; */
}
</style>
</head>
<body>
<h1>Flex Box</h1>
<div class="container">
<div class="item" id="item1">First Box</div>
<div class="item" id="item2">Second Box</div>
<div class="item" id="item3">Third Box</div>
<div class="item" id="item4">Fourth Box</div>
</div>
</body>
</html>