x
1
2
<html>
3
<head>
4
<meta charset="utf-8">
5
<style>
6
.flex-container {
7
display: flex;
8
display: flex;
9
width: 400px;
10
height: 250px;
11
background-color: lightgrey;
12
}
13
14
.flex-item {
15
background-color: cornflowerblue;
16
width: 100px;
17
height: 100px;
18
margin: 10px;
19
}
20
21
.first {
22
order: -1;
23
order: -1;
24
}
25
</style>
26
</head>
27
<body>
28
29
<div class="flex-container">
30
<div class="flex-item">flex item 1</div>
31
<div class="flex-item first">flex item 2</div>
32
<div class="flex-item">flex item 3</div>
33
</div>
34
35
</body>
36
</html>