Background opacity
Utilities for controlling the opacity of an element's background color
Class reference
Usage
Control the opacity of an element’s background color using the .bg-opacity-{amount}
utilities.
Responsive
To control an element’s background color opacity at a specific breakpoint, add a {screen}:
prefix to any existing background color opacity utility. For example, use md:bg-opacity-50
to apply the bg-opacity-50
utility at only medium screen sizes and above.
<div class="bg-blue-500 bg-opacity-75 md:bg-opacity-50">
<!-- ... -->
</div>
For more information about Elements’ responsive design features, check out the Responsive Design documentation.
On this Page
v1.13.5