Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap 3 modal overlay background color and animation

I'm having some issues changing the background color when the Modal Window is displayed using Bootstrap 3.

Ideally I want it to be more of a black and tone down the opacity a bit, but when you click on the boxes located here;

http://roblb.devour.org/march2014/index%20copy.html

Also - how do I stop the Modal sliding down? I just want it to fade in? I've seen a few items on here, but none of them actually answer this...

Thanks

Rob

like image 330
Akirob Avatar asked Apr 22 '14 07:04

Akirob


3 Answers

To change the backdrop color you can use this:

.modal-backdrop {
  background-color: #0000ff;
}

or separate into clases:

.modal-blue .modal-backdrop {
  background-color: #0000ff;
}

.modal-white .modal-backdrop {
  background-color: #ffffff;
}

and then add the class to your div:

<div class="modal fade modal-white" ... >
  <div class="modal-dialog">
      ...
  </div>
</div>

to stop sliding down remove the "fade" class.

Hope this help,

regards.

like image 158
Cairo Avatar answered Nov 03 '22 08:11

Cairo


Easy remedy is to override the default. Just use:

.fade.in {
   background: #000; // or whatever you like
}
like image 41
claudios Avatar answered Nov 03 '22 08:11

claudios


I used :

.modal {
  background-color:black;
}

And it worked.

like image 28
Théo T. Carranza Avatar answered Nov 03 '22 09:11

Théo T. Carranza