Opacity

Control the opacity of elements.

Examples

The opacity property sets the opacity level for an element. The opacity level describes the transparency level, where 1 is not transparent at all, .5 is 50% visible, and 0 is completely transparent.

Set the opacity of an element using .opacity-{value} utilities.

100%
75%
50%
25%
0%
<div class="opacity-100">...</div>
<div class="opacity-75">...</div>
<div class="opacity-50">...</div>
<div class="opacity-25">...</div>
<div class="opacity-0">...</div>

SASS Reference

Variables

The available Customization options, or Sass variables, that can be customized for this grouping of utility classes.

Name Type Default Description
$enable-utility-opacity boolean true Enable the generation of the opacity utility classes.
$utility-opacity map
("0": 0,
"25":.25,
"50": .5,
"75": .75,
"100": 1)
Map of opacity names and rules to be generated.

Mixins

No mixins available.