zl程序教程

您现在的位置是:首页 >  后端

当前栏目

bootstarp modal自己主动调整宽度的JS代码

JS代码 自己 调整 主动 宽度 modal
2023-09-14 09:08:01 时间
$('#ajaxPage').modal('show').css({
                        width: 'auto',
                        'margin-left': function () {
                            return -($(this).width() / 2);
                        }
                    });
能够自己主动调整modal对象的宽度。而且绝对居中