$('#addFormbox').modal().css({
width: 'auto',
'margin-left': function () {
return -($(this).width() / 2);
}
});
width: 'auto',
'margin-left': function () {
return -($(this).width() / 2);
}
});
本文介绍如何使用JavaScript动态调整模态框的宽度,并使其居中显示,适用于各种屏幕尺寸。
1780