Tailwind CSS Sepia
The sepia class is an inbuilt class that is used to apply a filter to the image to convert an image into a sepia image. In CSS, we do that by using the CSS sepia() Function. Tailwind CSS newly added feature brightness in 2.1 version.
Sepia:
- sepia-0: This class is used to represent the original image
- sepia: This class is used to represent the sepia image.
Syntax:
<element class="filter sepia| sepia-0">..</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-20 space-y-2" > < h1 class = "text-green-600 text-5xl font-bold" > GeeksforGeeks </ h1 > < b >Tailwind CSS Sepia Class</ b > < div class = "grid grid-flow-col text-center mx-44" > < img class = "rounded-lg filter sepia" src = alt = "image" > < img class = "rounded-lg filter sepia-0" src = alt = "image" > </ div > </ body > </ html > |
Output:
Please Login to comment...