Open In App
Related Articles

Tailwind CSS Backdrop Saturate

Improve Article
Improve
Save Article
Save
Like Article
Like

The backdrop saturate class is an inbuilt function in CSS that is used to super-saturate or desaturates the input image. Tailwind CSS newly added feature brightness in 2.1 version.

Backdrop Saturate:

  • backdrop-saturate-0: This class used to set the saturated equivalent on an element to CSS saturate(0).
  • backdrop-saturate-50: This class used to set the saturated equivalent on an element to CSS saturate(50).
  • backdrop-saturate-100: This class used to set the saturated equivalent on an element to CSS saturate(100).
  • backdrop-saturate-150: This class used to set the saturated equivalent on an element to CSS saturate(150).
  • backdrop-saturate-200: This class used to set the saturated equivalent on an element to CSS saturate(200).

Syntax:

<element class=
    "filter backdrop-saturate-{amount}">
</element>

Example:

HTML




<!DOCTYPE html>
<html>
    
<head>
    <link href=
"https://unpkg.com/tailwindcss@^2.1/dist/tailwind.min.css"
    rel="stylesheet">
</head>
  
<body class="text-center mx-4 ">
  <h1 class="text-green-600 text-5xl font-bold">
      GeeksforGeeks
  </h1>
  
  <b>Tailwind CSS Backdrop Saturate Class</b>
  
  <div class=" mx-16 mt-18 h-36 relative">
    <div class="absolute w-full py-18">
      <img class="rounded-lg object-cover" src=
       alt="image">
    </div>
      
    <div class="relative h-32 flex overflow-x-auto space-x-4">
      <div class="flex-shrink-0 border-4 border-green-500 
           backdrop-filter backdrop-saturate-0 w-1/3">
      </div>
  
      <div class="flex-shrink-0 border-4 border-green-500 
           backdrop-filter backdrop-saturate-100 w-1/3">
      </div>
  
      <div class="flex-shrink-0 border-4 border-green-500 
           backdrop-filter backdrop-saturate-200 w-1/3">
      </div>
    </div>
      
  </div>
</body>
  
</html>


Output:


Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 23 Mar, 2022
Like Article
Save Article
Similar Reads
Related Tutorials