-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnested-flex.html
More file actions
49 lines (39 loc) · 1.07 KB
/
Copy pathnested-flex.html
File metadata and controls
49 lines (39 loc) · 1.07 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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>flex-direction</title>
<style media="screen">
main{
border:2px solid black;
display:flex;
flex-direction: column;
margin: 10px;}
.item1{background-color:red;}
.item2{background:blue;}
.item3{background:green;
display:flex;}
.item4{background:yellow;}
.items{
margin: 5px;
padding: 5px;}
.item3 .subitems{
background: rgb(220, 225, 226);
flex-grow:1;
margin:5px;
}
</style>
</head>
<body>
<main>
<div class="item1 items">red</div>
<div class="item2 items">blue</div>
<div class="item3 items">
<div class="sub1 subitems">nested1</div>
<div class="sub2 subitems">nested2</div>
<div class="sub2 subitems">nested3</div>
</div>
<div class="item4 items">yellow</div>
</main>
</body>
</html>