Bootstrap Modal从中心而不是边缘调整大小

时间:2019-09-09 13:10:40

标签: css jquery-ui razor bootstrap-modal

我有一个动态的引导程序模式,其内容是通过向我的asp.net核心路由发出请求并覆盖响应中的html内容来填充的。我已将JQuery UI Resizable类添加到模式中。调整大小时,模态将从中心而不是边缘情况调整大小。

用于将可调整大小的选项添加到模式的代码:

var $modal: JQuery = $('#blah_ModalPopup > .modal-content');

$modal.resizable({
        alsoResize: '.configuration-container, .modal-dialog',
        // Sizes
        minHeight: 300,
        minWidth: 450,
        maxWidth: window.innerWidth -20,
        // Functions
        resize: function (e, ui) { // Fired when the handle in the bottom right corner is clicked and dragged.
            $('.configuration-container').css("max-height", "fit-content");
        }
    });

我的模式的HTML结构: image preview

如果有关于为什么从中心而不是仅从边缘调整大小的任何建议,将不胜感激。

0 个答案:

没有答案