-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathflex-order.html
More file actions
70 lines (61 loc) · 1.61 KB
/
flex-order.html
File metadata and controls
70 lines (61 loc) · 1.61 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Chapter 6: Direction of flow in flexbox</title>
<link rel="stylesheet" href="../assets/css/common.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans|Roboto+Slab" rel="stylesheet">
<style>
.cards {
margin: 0 -10px;
padding: 0;
list-style: none;
display: flex;
flex-direction: row-reverse;
}
.cards li {
background-color: #edf2ff;
border: 1px solid #bac8ff;
margin: 0 10px 20px 10px;
padding: 10px;
border-radius: 5px;
flex: 1;
}
.cards li:nth-child(1) {
order: 3;
}
.cards li:nth-child(2) {
order: 1;
}
.cards li:nth-child(3) {
order: 2;
}
</style>
</head>
<body id="ch1">
<header class="example-header">
<ul class="meta">
<li class="book">The New CSS Layout</li>
<li class="author">Rachel Andrew</li>
<li class="chapter">Chapter 6</li>
<li class="index"><a href="../">Index of examples</a></li>
</ul>
<div class="inner">
<h1>flexbox - order</h1>
</div>
</header>
<div class="example">
<ul class="cards">
<li>
<h2>Card 1</h2>
</li>
<li>
<h2>Card 2</h2>
</li>
<li>
<h2>Card 3</h2>
</li>
</ul>
</div>
</body>
</html>