I am using bootstrap modal. When modal is open background content opacity is not changed by default. I tried changing in js using
function showModal() {
doc
Adding !important to .modal-backdrop will ruin the transition on bootstrap modal
I achieved changing modal overlay background by direct edit in bootstrap.min.css. Those who are using bootstrap CSS locally (without using CDN) can change the background-color value of .modal-backdrop class.
If you want to change bootstrap 4 modal overlay opacity find this class .modal-backdrop.show and change opacity to the value you need.
If want to change overlay transition timing add transition to .modal-backdrop.fade class
If want to change transition timing for modal object change transition values in .modal.fade .modal-dialog class