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