Backdrop Opacity In Tailwind CSS
In this article, we will explore the use of Tailwind Backdrop Opacity class with examples. With Tailwind, you can use the Backdrop Opacity class in all web browsers.
Tailwind Backdrop Opacity
Tailwind Backdrop Opacity class applies a filter to the image and modifies its transparency.
In normal CSS, we accomplish this using the opacity() function. Tailwind CSS added this feature in version 2.1.
Syntax
<element class="filter backdrop-opacity-{number}">..</element>
Backdrop Opacity value
- backdrop-opacity-number: In this case, the number can be replaced by a variable from 0 to 100, with a gap of five like 5,10,15 up to 100.
Note: In examples backdrop-hue-rotate class has been applied to differentiate between the examples. When applying backdrop-opacity-100, the backdrop hue-rotate filter is preset. On the other hand with backdrop-opacity-0, the backdrop-hue-rotate filter becomes transparent. For the values between 0 to 100 the backdrop-hue-rotate filter’s transparency increases from 100 to 0.