jackhammer013 jackhammer013 - 6 days ago 5
CSS Question

Bootstrap Modal Image Background

Just want to ask if it is possible to have a background image in my modal? I've tried searching but I only see background related things on modal which refers to the page itself. What I want is my modal box to have an image background on it. Or change it color? Thanks. I'm not that good in CSS. Thanks.

Answer

Assuming you want an image in your modals body you can use

.modal-body {
   background-image: url(path/to/image);
}

Or if you want it behind your modal you can use

.modal-backdrop {
   background-image: url(path/to/image);
}
Comments