How to change background Opacity when bootstrap modal is open

后端 未结 14 2107
慢半拍i
慢半拍i 2020-12-24 00:37

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         


        
14条回答
  •  清歌不尽
    2020-12-24 01:22

    You can download a custom compiled bootstrap 3, just customize the @modal-backdrop-opacity from:

    https://getbootstrap.com/docs/3.4/customize/

    Customizing bootstrap 4 requires compiling from source, overriding $modal-backdrop-bg as described in:

    https://getbootstrap.com/docs/4.4/getting-started/theming/

    In the answers to Bootstrap 4 custom build generator / download there is a NodeJS workflow for compiling Bootstrap 4 from source, alone with some non-official Bootstrap 4 customizers.

提交回复
热议问题