forked from chinmay021/web-development-tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtut28.html
More file actions
87 lines (74 loc) · 2.62 KB
/
tut28.html
File metadata and controls
87 lines (74 loc) · 2.62 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
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
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flexbox Tutorial</title>
<style>
.container {
height: 544px;
width: 100%;
border: 2px solid black;
/* initialize the container as flex box */
display: flex;
/* Flex properties for flex container */
/* (Default value of flex-direction is row) */
/*flex-direction: row;
flex-direction: column;
flex-direction: row-reverse;
flex-direction: column-reverse; */
/* flex-wrap: wrap; (Default value of flex-direction is no-wrap) */
/* flex-wrap: wrap-reverse; */
/* This is a shorthand for flex-direction: and flex-wrap: ;; */
/* flex-flow: row-reverse wrap; */
/* justify-content will justify the content in horizontal direction */
/* justify-content: center; */
/* justify-content: space-between; */
/* justify-content: space-evenly; */
/* justify-content: space-around; */
/* align-items will justify the content in vertical direction */
/* align-items: center; */
/* align-items: flex-end; */
/* align-items: flex-start; */
/* align-items: stretch; */
}
.item{
background-color: tomato;
border: 2px solid green;
margin: 10px;
padding:2px;
width: 200px;
height: 200px;
}
#item-1{
/* Flex properties for a flex item */
/* Higher the order, later it shows up in the container */
order: 2;
/* flex-grow: 2;
flex-shrink: 2; */
}
#item-2{
/* flex-grow: 3;
flex-shrink: 3 ; */
flex-basis: 160px;
/* when flex-direction is set to row flex-basis: will control width */
/* when flex-direction is set to column flex-basis: will control height */
}
#item-3{
order:30;
/* flex: 2 2 230px; */
/* align-self: flex-start;
align-self: flex-end;
align-self: center; */
}
</style>
</head>
<body>
<h1>This is a flexbox tutorial</h1>
<div class="container">
<div class="item" id="item-1">first box</div>
<div class="item" id="item-2">Second box</div>
<div class="item" id="item-3">Third box</div>
</div>
</body>
</html>