Bootstrap 3 modal overlay background color and animation

北城余情 提交于 2019-12-04 06:41:57

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.

Easy remedy is to override the default. Just use:

.fade.in {
   background: #000; // or whatever you like
}

I used :

.modal {
  background-color:black;
}

And it worked.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!