-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflexBasis.html
More file actions
58 lines (53 loc) · 1.79 KB
/
Copy pathflexBasis.html
File metadata and controls
58 lines (53 loc) · 1.79 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flex-direction</title>
<link href='https://fonts.googleapis.com/css?family=Josefin Sans' rel='stylesheet'>
<link rel="stylesheet" href="./css/boilerplate.css">
<link rel="stylesheet" href="./css/flexBasis.css">
</head>
<body>
<div class="header">
<h1>Flex With Flexbox</h1>
<p>The flex-basis property specifies the initial length of a flex item</p>
</div>
<div class="head-container">
<h3 class="text-center">Item 2 has width of 200px. flex-basis: 200px;</h3>
<div class="flex-container sample1">
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
</div>
</div>
<div class="head-container">
<h3 class="text-center">All items have initial width of 33% - flex-basis: 33%;</h3>
<div class="flex-container sample2">
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
</div>
</div>
<div class="header">
<p><b>The "Flex" property</b></p>
<p>The flex property is a shorthand property for the flex-grow, flex-shrink, and flex-basis properties.</p>
</div>
<div class="head-container">
<h3 class="text-center">Everything default - flex: 0 1 auto;</h3>
<div class="flex-container sample3">
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
</div>
</div>
<div class="head-container">
<h3 class="text-center">flex: 1 1 25%</h3>
<div class="flex-container sample4">
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
</div>
</div>
</body>
</html>