align-content: center মান ফ্লেক্স লাইনগুলোর গোষ্ঠীকে ক্রস-অক্ষের মাঝপথে (ভertetিক্যালি সেন্টারে) রাখে। flex-wrap: wrap থাকতে হয়।
উদাহরণ
নিচের কোডটি চালিয়ে center মান ব্যবহার দেখুন:
<!DOCTYPE html> <html>
<head>
<style>
.mycontainer {
display: flex;
height: 200px;
background-color: red;
align-content: center;
flex-wrap: wrap;
}
.mycontainer > div {
background-color: yellow;
text-align: center;
line-height: 60px;
font-size: 30px;
width: 100px;
margin: 5px;
}
</style>
</head>
<body>
<h1>Queue</h1>
<div class="mycontainer">
<div>Q1</div>
<div>Q2</div>
<div>Q3</div>
<div>Q4</div>
<div>Q5</div>
<div>Q6</div>
<div>Q7</div>
<div>Q8</div>
</div>
</body>
</html>
ব্যাখ্যা: ৮টি আইটেম ২ লাইনে ভাগ হয়েছে। align-content: center এই ২টি লাইনের গোষ্ঠীকে কন্টেইনারের ২০০পিক্সেল উচ্চতার মাঝপথে নিয়ে এসেছে। উপরে এবং নিচে সমান খালি স্পেস থাকবে।