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
| <!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Test Flex</title>
<base href="/">
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
</head>
<style>
.Blocks {
display: flex;
flex-direction: row;
flex-grow: 4;
flex-wrap: wrap;
flex-flow: row wrap;
flex-basis: 2px;
}
.Block {
align-self: self-start;
margin: 4px;
background-color: #FF0000;
color: #FFFFFF;
width: 400px;
}
.B1 {
order: 1;
height: 200px;
}
.B2 {
order: 2;
height: 350px;
}
.B3 {
order: 3;
height: 50px;
}
.B4 {
order: 4;
height: 200px;
}
.B5 {
order: 5;
height: 500px;
}
</style>
<body>
<div class="Blocks">
<div class="Block B1">Order 1</div>
<div class="Block B2">Order 2</div>
<div class="Block B3">Order 3</div>
<div class="Block B4">Order 4</div>
<div class="Block B5">Order 5</div>
</div>
</body>
</html> |
Partager