সিএসএস
🌈সিএসএস কি?
📋সিএসএস হলো সারিবদ্ধতা ও ফাঁক নির্দিষ্ট করার পদ্ধতি।
⚒️সিএসএস সারিবদ্ধতা ও ফাঁক নির্দিষ্ট করতে ব্যবহৃত হয়।
সিএসএস সমূহ
সিএসএস এবং সেগুলোর ব্যবহারের তালিকা
- ➡️ justify-content - কনটেন্টের ন্যায্যতা নির্দিষ্ট করা
- ➡️ justify-items - একাধিক আইটেমের ন্যায্যতা নির্দিষ্ট করা
justify-content - কনটেন্টের ন্যায্যতা নির্দিষ্ট করার উদাহরণ।
css
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.container {
width: 300px;
height: 80px;
border: solid black 1px;
display: grid;
grid-template-columns: repeat(3, 50px);
gap: 5px;
margin-bottom: 10px;
}
.container > div {
height: 40px;
background-color: coral;
}
.start {
justify-content: start;
}
.end {
justify-content: end;
}
.center {
justify-content: center;
}
.space-between {
justify-content: space-between;
}
.space-around {
justify-content: space-around;
}
.space-evenly {
justify-content: space-evenly;
}
</style>
</head>
<body>
<div class="container start">
<div></div>
<div></div>
<div></div>
</div>
<div class="container end">
<div></div>
<div></div>
<div></div>
</div>
<div class="container center">
<div></div>
<div></div>
<div></div>
</div>
<div class="container space-between">
<div></div>
<div></div>
<div></div>
</div>
<div class="container space-around">
<div></div>
<div></div>
<div></div>
</div>
<div class="container space-evenly">
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>
justify-items - একাধিক আইটেমের ন্যায্যতা নির্দিষ্ট করার উদাহরণ।
css
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.container {
width: 300px;
height: 80px;
border: solid black 1px;
display: grid;
grid-template-columns: repeat(3, 80px);
margin-bottom: 10px;
}
.container > div {
width: 40px;
height: 40px;
background-color: coral;
}
.start {
justify-items: start;
}
.end {
justify-items: end;
}
.center {
justify-items: center;
}
.stretch {
justify-items: stretch;
}
</style>
</head>
<body>
<div class="container start">
<div></div>
<div></div>
<div></div>
</div>
<div class="container end">
<div></div>
<div></div>
<div></div>
</div>
<div class="container center">
<div></div>
<div></div>
<div></div>
</div>
<div class="container stretch">
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>
সিএসএস সম্পর্কিত বিস্তারিত তথ্য
কার্যকর কোডিং উদাহরণ এবং সেগুলোর রেফারেন্স লিংক
| নাম | বিবরণ |
|---|---|
| justify-content | কনটেন্টের ন্যায্যতা নির্দিষ্ট করতে ব্যবহৃত হয়। |
| justify-items | একাধিক আইটেমের ন্যায্যতা নির্দিষ্ট করতে ব্যবহৃত হয়। |