-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFlex Property.html
More file actions
542 lines (522 loc) · 14.2 KB
/
Flex Property.html
File metadata and controls
542 lines (522 loc) · 14.2 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
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
/* Flex Property */
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="stylesheet" href="/CSS/style.css" />
<style>
/*
justify-content er main value 3 ta
flex-start, flex-end, center
*/
/*
justify-content: flex-start;
dile element gula main axis'r starting,
mane ekdom shuru te chole jabe
*/
/*
justify-content: flex-end;
set korle element gula main axis'r ekdom end e chole jabe
*/
/*
justify-content: center;
korle element gula ekdom container'r center e chole ashbe
*/
/*
justify-content: space-around;
set korle each element'r majhe nirdishto poriman space create hoy
and first and last element theke container'r border'r majheo ekta space create hoy
*/
/*
flex-wrap: nowrap;
dile container'r bhitore thaka flex item gula
tader nijeder choto boro kore felbe oi container e atanor jonno
*/
/*
flex-wrap: wrap;
set korle flex item gula nijeder size choto boro korbe na,
jemon ase temon e thakbe
*/
/*
flex-wrap: wrap-reverse;
is exactly like the row-reverse concept
*/
/*
align-items: baseline;
set korle, eta oi container'r cross axis bora bor
basline ba ekdom oi container'r shuru jeta ke bola hoy
sekhane giye set hbe
*/
/*
align-items: center;
set korle flex item gula flex container'r
cross axis bora bor center e giye set hbe
*/
/*
align-items: end;
set korle flex item gula flex container'r
cross axis bora bor ekdom end e giye set hbe
*/
/*
align-content:
eta tokhon e kaj korbe jokhon kina,
kono flex container'r bhitore thaka flex item gula
1'r odhik orthat multiple line e thakbe tokhon e
er jonne align-content kaj koraite hoile
flex-wrap: wrap;
set korte hoy,
keno na flex-wrap: wrap; set korlei ekmatro flex item gula tokhon multiple line e set hoy,
jodi multiple line na e ashe tahole ki kore align contnent kaj korbe.
align content'r arekta kaj hocche,
muloto kono container wrap korle tar flex item gular majhe space create hoy,
align content diye muloto ei space ta e cotnrol kora jay
*/
/*
align-content: start; ba
align-content: baseline;
set korle flex item gula cross axis'r ekdom shuru te jeye set hbe
*/
/*
align-self
eta diye muloto ekta container'r indivitual kono flex item'r align set kora jay
*/
/*
flex-shrink
eta muloto kono ekta flex item koto tuk shrink korbe,
ba choto hbe ta nirdesh kore
container e dekha jay container choto korle flex item gula o choto hoye or moddhe fit hoy,
kintu jodi kono ekta specific flex item'r shrink houa komaite ba baraite chai tokhon ei property used hoy
*/
body {
text-align: center;
}
div {
border: 2px solid black;
display: inline-block;
height: 50px;
width: 50px;
}
#container1 {
height: 200px;
width: 800px;
display: flex;
flex-direction: row;
justify-content: flex-start;
/*
ekhane flex-direction row set kora,
ty er main axis hocche x axis ba horizontal line ta,
ty ekhane element gula main axis'r left e chole ashche ekbare,
orthat axis'r shuru te chole ashche
*/
}
#container2 {
height: 200px;
width: 800px;
display: flex;
flex-direction: row;
justify-content: flex-end;
/*
ekhane element gula main axis'r end e chole jabe,
flex-direcction row houa te er end hocche ekdom right side e,
tai content gula ekdom end e chole jabe
*/
}
#container3 {
height: 200px;
width: 800px;
display: flex;
flex-direction: row;
justify-content: center;
/*
justify-content: center; set kora te element gula ekdom container'r center e chole ashche
*/
}
#container4 {
height: 200px;
width: 800px;
display: flex;
flex-direction: row;
justify-content: space-around;
/*
ekhane ekta bishoy lokkho korte hbe ta holo,
justify-content: space-around;
set korle
each element'r majh'r distance'r ordhen hobe hocche
last ba first element theke container'r border'r distance
*/
}
#container5 {
height: 400px;
width: 800px;
display: flex;
flex-direction: column;
justify-content: flex-start;
/*
same concept as like the "row"
*/
}
#container6 {
height: 400px;
width: 800px;
display: flex;
flex-direction: column;
justify-content: flex-end;
/*
same concept as like the "row"
*/
}
#container7 {
height: 400px;
width: 800px;
display: flex;
flex-direction: column;
justify-content: center;
/*
same concept as like the "row"
*/
}
#container8 {
height: 200px;
width: 200px;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
}
#container9 {
height: 200px;
width: 200px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
#container10 {
height: 200px;
width: 200px;
display: flex;
flex-direction: row;
flex-wrap: wrap-reverse;
}
#container11 {
height: 400px;
width: 800px;
display: flex;
flex-direction: row;
align-items: baseline;
/*
ekhane flex-direction: row;
set koray er cross axis hocche vertical line ba
y axis arki amra jeta ke boli
so, ekhane flex items gula cross axis'r starting ba
arki jeta ke baseline bola hocche sekhane giye set hocche
*/
}
#container12 {
height: 400px;
width: 800px;
display: flex;
flex-direction: row;
align-items: center;
/*
flex-direction: row;
houa te cross axis hocche vertical line ta
and flex item gula cross axis'r center e giye set hocche
*/
}
#container13 {
height: 400px;
width: 800px;
display: flex;
flex-direction: row;
align-items: end;
/*
ekhane flex item gula cross axis'r
ekdom end e jaya set hocche
*/
}
#container14 {
height: 200px;
width: 200px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-content: start;
}
#container15 {
height: 200px;
width: 200px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-content: center;
/*
ekhane flex item gula
flex container'r center e giye set hoise
*/
}
#container16 {
height: 200px;
width: 200px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-content: end;
/*
ekhane flex item gula flex container'r
cross axis'r end e giye set hoise
*/
}
#container17 {
height: 400px;
width: 800px;
display: flex;
flex-direction: row;
align-items: end;
/*
ekhane ei container'r jonno every flex item ekdom end e ase cross axis'r
but individually box6 er align change kore eke ekdom start e niye jawa jabe
align-self diye
*/
}
#container18 {
height: 200px;
width: 200px;
display: flex;
flex-direction: row;
/*
ekhane ekhn every box 40*54 akare ache,
orthat shob gula box e same onupate shrink hoise,
ekhn jodi ami chai box7 onno gula theke 2 gun akare shrink hbe,
tahole flex-shrink property ta use korte hbe
default value hishabe shob gula box'r flex-shrink: 1; thake
ei karonei shob gula box ekoi onupate shrink kore.
so flex-shrink 1 er beshi hoile shrink onno gula theke tulonamulok beshi hbe,
and 1 er kom hoile shrink onno gula theke tulonamulok kom hbe
*/
}
#container19 {
height: 400px;
width: 800px;
display: flex;
flex-direction: row;
}
#container20 {
height: 400px;
width: 800px;
display: flex;
flex-direction: row;
}
#box1 {
background-color: aqua;
}
#box2 {
background-color: pink;
}
#box3 {
background-color: rgb(255, 200, 0);
}
#box4 {
background-color: rgb(238, 110, 110);
}
#box5 {
background-color: rgb(226, 97, 226);
}
#box6 {
align-self: flex-start;
}
#box7 {
flex-shrink: 2;
/*
ekhn ekhane box7 er akar onno gula theke beshi shrink hoise
*/
}
#box8 {
background-color: green;
flex-grow: 1;
/*
ekhane box8 e flex-grow 1 dewa te
box tar grow hoise,
jodi ei box e flex-grow property use na kora hoito
tahole ei box8'r jayga jto tuk seta kora ase toto tuk e nito
and container'r onekta ongsho khali pore thakto
kintu ekhane flex-grow property apply koray er grow hoise
*/
}
#box9 {
background-color: greenyellow;
flex-grow: 1;
}
#box10 {
background-color: rebeccapurple;
flex-grow: 2;
/*
to ekhane ja hocche ta holo
box9 joto tuk grow korbe tar exactly 2 gun grow hbe
box10'r
*/
}
</style>
</head>
<body>
<div id="container1">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box5">box5</div>
</div>
<br />
<div id="container2">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box5">box5</div>
</div>
<br />
<div id="container3">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box5">box5</div>
</div>
<br />
<div id="container4">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box5">box5</div>
</div>
<br />
<div id="container5">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box5">box5</div>
</div>
<br />
<div id="container6">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box5">box5</div>
</div>
<br />
<div id="container7">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box5">box5</div>
</div>
<br />
<div id="container8">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box5">box5</div>
</div>
<br />
<div id="container9">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box5">box5</div>
</div>
<br />
<div id="container10">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box5">box5</div>
</div>
<br />
<div id="container11">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box5">box5</div>
</div>
<br />
<div id="container12">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box5">box5</div>
</div>
<br />
<div id="container13">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box5">box5</div>
</div>
<br />
<div id="container14">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box5">box5</div>
</div>
<br />
<div id="container15">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box5">box5</div>
</div>
<br />
<div id="container16">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box5">box5</div>
</div>
<br />
<div id="container17">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box6">box6</div>
</div>
<br />
<div id="container18">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box7">box7</div>
</div>
<br />
<div id="container19">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box4">Box4</div>
<div id="box8">box8</div>
</div>
<br />
<div id="container20">
<div id="box1">Box1</div>
<div id="box2">Box2</div>
<div id="box3">Box3</div>
<div id="box9">box9</div>
<div id="box10">box10</div>
</div>
</body>
</html>