Create Twitter bootstrap modal window more

I use bootstrap to display images.

How to just make Twitter Bootstrap modal bigger?

I use the code from a ( related ) question:

 $('#myModal').modal({ backdrop: true, keyboard: true, show: false }).css({ // make width 90% of screen 'width': function () { return ($(document).width() * .9) + 'px'; }, // center model 'margin-left': function () { return -($(this).width() / 2); } }); 

But here is the result:

I need to scroll it. How to save image ratio and show it without scrollbar?

+4
source share
1 answer

When we display images using bootstrap modal, we use the following css:

 #myModal { max-height: 80%; overflow-y: auto; .modal-body { max-height: none; text-align: center; } } 

And then just

 $('#myModal').modal("show"); 

The circle sets max-height to .modal-body to none .

+4
source

Source: https://habr.com/ru/post/1486764/


All Articles