I'm facing some challenges in achieving the fade out effect in Bootstrap 5 modals. I am aiming for something similar to the "Fade In & Scale" effect demonstrated here: https://tympanus.net/Development/ModalWindowEffects/
It is crucial for me to accomplish this without relying on jQuery or any other external libraries.
Below is the CSS code I have been experimenting with, which seems to only work for the fade-in aspect; the class "fade-scale" is applied to my modal:
.fade-scale {
transform: scale(0.5);
opacity: 0;
transition: all 0.2s linear;
}
.fade-scale.show {
opacity: 1;
transform: scale(1);
}
I have attempted the suggestions provided in this discussion but have encountered issues with them (they either relied on jQuery/other libraries or did not result in a proper fade out effect). How can I achieve a fade out effect in a Bootstrap 5 modal?