-
Notifications
You must be signed in to change notification settings - Fork 0
/
flexbox2.html
61 lines (52 loc) · 1.28 KB
/
flexbox2.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Flexbox #02</title>
<link rel="stylesheet" href="css/tag.css">
<style>
div {
border: solid 5px dodgerblue;
font-size: 40px;
}
.flex-container div {
box-sizing: border-box;
width: 100px;
flex-grow: 1;
}
.flex-container {
display: flex;
height: 300px ;
width: 600px;
}
.flex-container div:nth-child(3) {
background-color: indianred;
order: 1;
order: 0;
order: -1;
align-self: center;
align-self: flex-end;
align-self: flex-start;
}
.flex-container div:nth-child(1){
flex-grow: 2;
}
.flex-container {
width: 300px;
flex-shrink: 1;
}
.flex-container div:nth-child(1){
flex-shrink: 5;
}
</style>
</head>
<body>
<div class="flex-container tag nolabel">
<div class="tag nolabel">1</div>
<div class="tag nolabel">2</div>
<div class="tag nolabel">3</div>
<div class="tag nolabel">4</div>
</div>
<script src="js/tag.js"></script>
</body>
</html>