Bootstrap 5 Opacity
Opacity
Control the opacity of elements.
🤖 Looking for the LLM-optimized version?View llm.md
Theopacity
property sets the opacity level for an element. The opacity level describes the transparency level, where1
is not transparent at all,.5
is 50% visible, and0
is completely transparent.
Set theopacity
of an element using.opacity-{value}
utilities.
100%
75%
50%
25%
0%
<divclass="opacity-100">...</div><divclass="opacity-75">...</div><divclass="opacity-50">...</div><divclass="opacity-25">...</div><divclass="opacity-0">...</div>
Utilities API
Opacity utilities are declared in our utilities API inscss/_utilities.scss
.Learn how to use the utilities API.
scss/_utilities.scss
"opacity":(property:opacity,values:(0:0,25:.25,50:.5,75:.75,100:1,)),