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

$('#ajaxPage').modal('show').css({
                        width: 'auto',
                        'margin-left': function () {
                            return -($(this).width() / 2);
                        }
                    });
能够自己主动调整modal对象的宽度。而且绝对居中
posted @ 2015-12-24 17:04  phlsheji  阅读(221)  评论(0编辑  收藏  举报