小编Ale*_*lex的帖子

DataTables Bootstrap 分页未呈现

我的测试服务器上有示例数据表。但是,由于某种原因,Bootstrap 分页无法正确呈现。

渲染问题

这不是 Bootstrap 样式。这是代码:

   <!DOCTYPE html>
   <html>
   <head>
   <script src='https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js'></script>
   <script src='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js'></script>
   <link href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css' rel='stylesheet'>
  <link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css">
<script src="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js" charset="utf-8"></script>
<script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js" charset="utf-8"></script>
   </head>
   <body>
         <table id="example" class="table display" cellspacing="0" width="100%">
    <thead>
        <tr>
            <th>Name</th>
            <th>Position</th>
            <th>Office</th>
            <th>Age</th>
            <th>Start date</th>
            <th>Salary</th>
        </tr>
    </thead>
    ...
    <script>
      $(document).ready(function(){
  $("#example").DataTable({
    // "sPaginationType": "bootstrap",
  });
});
    </script>
Run Code Online (Sandbox Code Playgroud)

在这个例子中如何呈现标准的 Bootstrap 样式?

编辑: 表标记:

      <table id="example" class="table display" cellspacing="0" width="100%">
    <thead>
        <tr>
            <th>User ID</th>
            <th>Name</th>
            <th>Company name</th>
            <th>Joining date</th>
            <th>Plan</th>
            <th>Commission</th>
        </tr>
    </thead>
    <tbody>
        <tr> …
Run Code Online (Sandbox Code Playgroud)

html css jquery datatables twitter-bootstrap-3

7
推荐指数
1
解决办法
2万
查看次数

标签 统计

css ×1

datatables ×1

html ×1

jquery ×1

twitter-bootstrap-3 ×1