জয়েন লগইন

সিএসএস scroll-snap-stop

🌈সিএসএস scroll-snap-stop কি?

📋সিএসএস scroll-snap-stop হলো স্ক্রল স্ন্যাপ থামার নিয়ম নির্ধারণ করার পদ্ধতি।

⚒️সিএসএস scroll-snap-stop স্ক্রল স্ন্যাপ থামার নিয়ম নির্ধারণ করতে ব্যবহৃত হয়।

সিএসএস scroll-snap-stop স্ক্রল স্ন্যাপ থামার নিয়ম নির্ধারণ করার উদাহরণ।

css
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.container {
  width: 300px;
  height: 200px;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}

.item {
  height: 200px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 20px;
  box-sizing: border-box;
}

.item:nth-child(1) {
  background-color: pink;
}

.item:nth-child(2) {
  background-color: yellow;
}

.item:nth-child(3) {
  background-color: lightblue;
}
</style>
</head>
<body>

<div class="container">
  <div class="item">এইচটিএমএল</div>
  <div class="item">সিএসএস</div>
  <div class="item">জাভাস্ক্রিপ্ট</div>
</div>

</body>
</html>