-
Notifications
You must be signed in to change notification settings - Fork 2
/
FlexBox.html
45 lines (45 loc) · 1.13 KB
/
FlexBox.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
<html>
<head>
<title></title>
<style type="text/css">
#flex-container{
display: flex;
border: 1px solid #CCCCCC;
flex-direction: row;
/*flex-wrap: wrap;*/
}
.item{
flex: auto;
width: 20em;
/*flex-grow: inherit;*/
}
#item1{
background-color: red;
margin: 3 3 3 3px;
flex-shrink: 2;
}
#item2{
background-color: blue;
margin: 3 3 3 3px;
}
#item3{
background-color: green;
margin: 3 3 3 3px;
}
#item4{
background-color: yellow;
margin: 3 3 3 3px;
flex-shrink: 1;
}
</style>
</head>
<body>
<div id="flex-container">
<div class='item' id='item1'>Item 1</div>
<div class='item' id='item2'>Item 2</div>
<div class='item' id='item3'>Item 3</div>
<div class='item' id='item4'>Item 4</div>
<div id='non-flex'>I am not Flex</div>
</div>
</body>
</html>