我需要通过jquery或普通javascript以编程方式更改模式的宽度。
这是我所拥有的:
<div class="modal fade" id="modal-popup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog modal-lg" role="document" id="modal_dialog">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title pull-left" id="action_title">My Title</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<div class="modal-body text-center">My Body</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close Window</button>
</div>
</div>
</div>
</div>
我似乎无法使用:
function popUpModal()
{
$('#modal-popup').modal('show');
$('.modal-content').css('width','99%');
console.log('it is firing!');
}
我在这里想念东西吗?
答案 0 :(得分:1)
将type: apiKey
中的components:
securitySchemes:
bearerAuth:
type: apiKey
name: X-Samanage-Authorization
in: header
设置为99%。模态内容宽度已经是模态对话框的百分比。
max-width
.modal-dialog