Bootstrap模态宽度溢出问题

时间:2014-12-09 18:53:58

标签: twitter-bootstrap modal-dialog

我尝试将宽度和溢出属性设置为span元素,以便应用最大宽度,但由于某种原因它不起作用。

以下是我所面临问题的jsFiddle:http://jsfiddle.net/nyonfvsy/2/

<div data-backdrop="static" class="modal fade" id="searchPO" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
                </button>
                 <h4 class="modal-title" id="myModalLabel">Post Office Lookup</h4>

            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label>Destination Post Office</label>
                    <br>
                    <input type="hidden" class="bigdrop" id="postoffice" name="postoffice" style="width:250px" />
                </div>
                <div class="form-group">
                    <label>Zips Served</label>  <span id="lookup_zipsserved"> 894,895,896,897,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969 </span>

                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save changes</button>
            </div>
        </div>
    </div>
</div>

邮政编码,不应该溢出模态。

1 个答案:

答案 0 :(得分:2)

添加此css规则

#lookup_zipsserved{
   word-wrap: break-word;
}