How can I change the way I see the page behind when I open a Twitter Bootstrap modal?

后端 未结 3 1089
逝去的感伤
逝去的感伤 2021-01-25 05:34

I am opening a modal but when I do this the page behind the modal goes very dark. Can someone explain how I can change this. For example how could I make it so there\'s just a v

相关标签:
3条回答
  • 2021-01-25 05:57

    If you're looking to keep the backdrop behind the modal but make the backdrop completely transparent, set a transparent background-color instead of changing the opacity:

    .modal-backdrop, .modal-backdrop.fade.in { background-color: rgba(0,0,0,0); }
    

    This allows you to be able to click off of your modal and have your modal close while not actually seeing the backdrop.

    0 讨论(0)
  • 2021-01-25 06:03

    If you are using bs 3, you can use data-backdrop="false" attribute in your link so you dont have to modify your base bootstrap files.

    It's in the documentation

    0 讨论(0)
  • 2021-01-25 06:09

    What your looking for is http://twitter.github.com/bootstrap/javascript.html#modals modal backdrop static to disable closing on background click.

    Also for the backdrop darkness adjust the

    .modal-backdrop, .modal-backdrop.fade.in {
        opacity: 0;
    }
    
    0 讨论(0)
提交回复
热议问题