How to put scroll bar only for modal-body?

后端 未结 13 1228
悲哀的现实
悲哀的现实 2020-11-30 18:14

I have the following element:

13条回答
  •  广开言路
    2020-11-30 18:30

    A simple js solution to set modal height proportional to body's height :

    $(document).ready(function () {
        $('head').append('');
    });
    

    body's height has to be 100% :

    html, body {
        height: 100%;
        min-height: 100%;
    }
    

    I set modal body height to 80% of body, this can be of course customized.

    Hope it helps.

提交回复
热议问题