<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.flex-container-1 {
display: flex;
justify-content: flex-start;
}
.flex-container-2 {
display: flex;
justify-content: flex-end;
}
.flex-container-3 {
display: flex;
justify-content: center;
}
.flex-container-4 {
display: flex;
justify-content: space-between;
}
.flex-container-5 {
display: flex;
justify-content: space-around;
}
.flex-container-6 {
display: flex;
justify-content: space-evenly;
}
.flex-item {
height: 10vh;
width: 20%;
margin: 5px;
padding: 5px;
font-size: 32px;
}
.red {
background-color: red;
color: white;
}
.green {
background-color: green;
color: white;
}
.blue {
background-color: blue;
color: white;
}
.yellow {
background-color: yellow;
color: black;
}
.pink {
background-color: pink;
color: black;
}
</style>
<title>CSS FLEXBOX</title>
</head>
<body>
<div class="flex-container-1">
<div class="flex-item red">1</div>
<div class="flex-item green">2</div>
<div class="flex-item blue">3</div>
<div class="flex-item yellow">4</div>
</div>
<div class="flex-container-2">
<div class="flex-item red">1</div>
<div class="flex-item green">2</div>
<div class="flex-item blue">3</div>
<div class="flex-item yellow">4</div>
</div>
<div class="flex-container-3">
<div class="flex-item red">1</div>
<div class="flex-item green">2</div>
<div class="flex-item blue">3</div>
<div class="flex-item yellow">4</div>
</div>
<div class="flex-container-4">
<div class="flex-item red">1</div>
<div class="flex-item green">2</div>
<div class="flex-item blue">3</div>
<div class="flex-item yellow">4</div>
</div>
<div class="flex-container-5">
<div class="flex-item red">1</div>
<div class="flex-item green">2</div>
<div class="flex-item blue">3</div>
<div class="flex-item yellow">4</div>
</div>
<div class="flex-container-6">
<div class="flex-item red">1</div>
<div class="flex-item green">2</div>
<div class="flex-item blue">3</div>
<div class="flex-item yellow">4</div>
</div>
</body>
</html>