flex
2 years ago in Plain Text
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
margin: 0;
padding: 0;
}
#f1{
background-color: royalblue;
}
#f2{
background-color: crimson;
}
#f3{
background-color: aquamarine;
}
#f4{
background-color: sandybrown;
}
#f5{
background-color: cyan;
}
.FlexItem{
padding: 20px;
border: solid 2px;
}
.FlexContainer{
display: flex;
justify-content: center;
}
</style>
</head>
<body>
<div class="FlexContainer">
<div class="FlexItem" id="f1">1</div>
<div class="FlexItem" id="f2">2</div>
<div class="FlexItem" id="f3">3</div>
<div class="FlexItem" id="f4">4</div>
<div class="FlexItem" id="f5">5</div>
</div>
</body>
</html>