我有数据库内容,其中包含不同类型的数据,例如 Youtube 视频、Vimeo 视频、文本、Imgur 图片等。它们都有不同的高度和宽度。我在互联网上搜索时发现的只是将大小更改为仅一个参数。它必须与弹出窗口中的内容相同。
这是我的 HTML 代码。我也使用Ajax来调用内容。
<div id="modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="ModalLabel"></h3>
</div>
<div class="modal-body">
</div>
</div>
这对我有用,以上都不起作用。
.modal-dialog{
position: relative;
display: table; /* This is important */
overflow-y: auto;
overflow-x: auto;
width: auto;
min-width: 300px;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)