Change the background color in a twitter bootstrap modal?

后端 未结 11 604
死守一世寂寞
死守一世寂寞 2020-12-01 03:01

When creating a modal in twitter bootstrap, is there any way to change the background color? Remove the shading entirely?

NB: For removing shading, this doesn\'

11条回答
  •  无人及你
    2020-12-01 03:26

    To change the color via:

    CSS

    Put these styles in your stylesheet after the bootstrap styles:

    .modal-backdrop {
       background-color: red;
    }
    

    Less

    Changes the bootstrap-variables to:

    @modal-backdrop-bg:           red;
    

    Source

    Sass

    Changes the bootstrap-variables to:

    $modal-backdrop-bg:           red;
    

    Source

    Bootstrap-Customizer

    Change @modal-backdrop-bg to your desired color:

    getbootstrap.com/customize/


    You can also remove the backdrop via Javascript or by setting the color to transparent.

提交回复
热议问题