数据大于bootstrap模式

时间:2017-04-24 00:35:45

标签: jquery html bootstrap-modal

我正在自动将数据写入模态,但正如您所见(here)我遇到了尺寸问题。

<div id="check-answers" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Answers</h4>
            </div>
            <div class="modal-body">
                <p>datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata</p>
                <p>datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata</p>
                <p>datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>

我如何解决这个问题,以便适合任何类型的数据?

1 个答案:

答案 0 :(得分:0)

只需将此添加到您的css

即可
.modal-body p {
    word-wrap: break-word;
}

working example