在Twitter引导程序中以模态呈现表

时间:2018-09-10 23:15:01

标签: twitter-bootstrap-3 bootstrap-4 bootstrap-modal

我正面临在Twitter Bootstrap模式上无法呈现表格的问题。我做的事情与jsfiddle(http://jsfiddle.net/iamakshay04/sh26m80o/2/)中提到的类似。因此,为了测试它,我尝试了完全相同的提及,发现data(table)呈现在页面上而不是模式上。

<div id="classModal" class="modal fade bs-example-modal-lg" 
     tabindex="-1" role="dialog" aria-labelledby="classInfo" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
          ×
        </button>
        <h4 class="modal-title" id="classModalLabel">
          Class Info
        </h4>
      </div>
      <div class="modal-body">
        <table id="classTable" class="table table-bordered">
          <thead>
          </thead>
          <tbody>
            <tr>
              <td>CLN</td>
              <td>Last Updated Date</td>
              <td>Class Name</td>
              <td># Tests</td>
              <td>Test Coverage (Instruction)</td>
              <td>Test Coverage (Complexity)</td>
              <td>Complex Covered</td>
              <td>Complex Total</td>
              <td>Category</td>
            </tr>
          </tbody>
        </table>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary" data-dismiss="modal">
          Close
        </button>
      </div>
    </div>
  </div>
</div>

jQuery:

$('#classModal').modal('show')

CSS:

#classModal {}

.modal-body {
  overflow-x: auto;
}

0 个答案:

没有答案