কম্পিউটার টিউটোরিয়াল

CSS দিয়ে রেসপন্সিভ কাটআউট/নকআউট টেক্সট তৈরি করার পদ্ধতি


উদাহরণ

নিচের কোডটি CSS mix-blend-mode ব্যবহার করে রেসপন্সিভ নকআউট টেক্সট তৈরি করার পদ্ধতি দেখায়:

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;}
.image-container {
    background-image: url("https://images.pexels.com/photos/957024/forest-trees-perspective-bright-957024.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940");
    background-size: cover;
    position: relative;
    height: 300px;
}
.text {
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
    font-size: 10vw;
    font-weight: bold;
    margin: 0 auto;
    padding: 10px;
    width: 50%;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    mix-blend-mode: multiply;
}
</style>
</head>
<body>
<h1 style="text-align: center;">Responsive Cutout Text Example</h1>
<div class="image-container">
<div class="text">FOREST</div>
</div>
</body>
</html>

আউটপুট

উপরোক্ত কোড নিচের আউটপুটটি তৈরি করবে:

CSS দিয়ে রেসপন্সিভ কাটআউট/নকআউট টেক্সট তৈরি করার পদ্ধতি


  1. CSS দিয়ে গ্লোইং (Glowing) টেক্সট তৈরি

  2. CSS দিয়ে রেসপন্সিভ টেস্টিমোনিয়াল (Testimonials) তৈরি

  3. CSS দিয়ে রিসপন্সিভ ব্লগ লে আউট (Responsive Blog Layout) তৈরি করা

  4. CSS দিয়ে রিসপন্সিভ কলাম কার্ড (Responsive Column Cards) তৈরি করা