Sometimes, we want to change background opacity when the Bootstrap modal is open with CSS.
This article will look at how to change background opacity when the Bootstrap modal is open with CSS.
To change background Opacity when Bootstrap modal is open with CSS, we set the opacity
style in the modal-backdrop
class.
For instance, we write
.modal-backdrop {
opacity: 0.5 !important;
}
to set the elements with class modal-backdrop
to have opacity 0.5.
Conclusion
To change background Opacity when the bootstrap modal is open with CSS, we set the opacity
style in the modal-backdrop
class.