-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
139 lines (133 loc) · 5 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!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">
<link rel="stylesheet" href="./css/style.css">
<link rel="shortcut icon" href="./icon/icon.png" type="image/x-icon">
<title>CSS Flexbox</title>
</head>
<body>
<header> <div class="page-title"><a href="/">CSS Flexbox</a></div>
<div class="another-page"><a href="./pages/grid.html">CSS Grid</a></div>
</header>
<main class="main">
<section class="left">
<div class="container">
<img src="./assets/flex/img-1.png" alt="" srcset="">
<h2>display</h2>
<pre>
<code>
.flex-container {
display: flex;
}
</code>
</pre>
</div>
<div id="flex-wrap-container" class="container">
<h2>flex-wrap</h2>
<img src="./assets/flex/flex-wrap.png" alt="" srcset="">
<pre>
<code>
.flex-container {
flex-wrap: wrap / no-wrap / wrap-reverse;
}
</code>
</pre>
</div>
<div id="justify-content-container" class="container">
<h2>justify-content</h2>
<img src="./assets/flex/justify-content.png" alt="" srcset="">
<pre>
<code>
.flex-container {
justify-content: flex-start / center / flex-end / space-around / space-between / space-evenly;
}
</code>
</div>
<div id="align-content-container" class="container">
<h2>align-content</h2>
<img src="./assets/flex/align-content.png" alt="">
<p><b>NOTE: </b>This property only takes effect when the flex-wrap attribute is set to <i>'wrap'</i> or <i>'wrap-reverse'.</i></p>
<pre>
<code>
.flex-container {
flex-wrap: wrap;
align-content: flex-start / center / flex-end / stretch / space-between / space-around;
}
</code>
</pre>
</div>
</section>
<section class="right">
<div class="description">
<blockquote cite="https://en.wikipedia.org/wiki/CSS_Flexible_Box_Layout"><p>CSS Flexible Box Layout, commonly known as Flexbox, is a CSS3 web layout model. It is in the W3C's candidate recommendation (CR) stage. The flex layout allows responsive elements within a container to be automatically arranged depending upon screen size (or device).
<br>
- Source: Wikipedia
</p></blockquote>
</div>
<div id="flex-direction-container" class="container">
<h2>flex-direction</h2>
<img src="./assets/flex/row-direction.png" alt="" srcset="">
<pre>
<code>
.flex-container {
flex-direction: row / row-reverse / column / column-reverse;
}
</code>
</pre>
</div>
<div id="flex-grow-shrink-container" class="container">
<h2>flex-grow & flex-shrink</h2>
<img src="./assets/flex/flex-grow-shrink.png" alt="">
<p>flex-grow</p>
<pre>
<code>
#flex-item-3 {
flex-grow: 4; /* default value = 0 */
}
</code>
</pre>
<p>flex-shrink</p>
<pre>
<code>
#flex-item-3 {
flex-shrink: 4; /* default value = 1 */
}
</code>
</pre>
</div>
<div id="align-items-container" class="container">
<h2>align-items</h2>
<img src="./assets/flex/align-items.png" alt="" srcset="">
<pre>
<code>
.flex-container {
align-items: flex-start / flex-end / center / stretch / baseline;
}
</code>
</div>
<div id="align-self-container" class="container">
<h2>align-self</h2>
<img src="./assets/flex/align-self.png" alt="">
<pre>
<code>
#flex-item-3 {
align-self: center;
}
</code>
</pre>
</div>
</section>
</main>
<footer>
This site is maintained by <a href="https://twitter.com/RwiteshBera" target="_blank">Rwitesh Bera</a>
<br>
<br>
<p>Hosted on Github <a href="https://github.com/rwiteshbera/CSS-Flexbox-Grid" target="_blank"><i class="fa fa-github"></i></a></p>
</footer>
</body>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="./js/script.js"></script>
</html>