css wkhtmltopdf未能尊重分页与表格

oxcyiej7  于 2023-01-03  发布在  其他
关注(0)|答案(1)|浏览(105)

看起来wkhtmltopdf在处理表格时对分页符有点过敏,因为在SO中不同版本的问题和答案的数量不同。
在撰写本文时,我正在运行最新版本0.12.6
这是我的html代码:

<HTML>
  <head>
    <title>A nice page</title>
    <link rel="stylesheet" href="screen.css" media="screen" />
    <link rel="stylesheet" href="printer.css" media="print" />
  </head>
  <body>
    <table class="printer_friendly">
      <tbody class="printer_friendly_tbody">
        <tr>
          <td class="tbody_first" colspan="6">This is the beginning of a new picture. This must be the first in the groupof tbody 0</td>
        </tr>
        <tr>
          <th colspan="3.0" rowspan="5">
            <img src="images/pdf_download.png" width="300px" />
          </th>
          <td>Random text</td>
          <td>Random text</td>
          <td>Random text</td>
        </tr>
        <tr>
          <td>This is (0, 0) in tbody 0</td>
          <td>This is (0, 1) in tbody 0</td>
          <td>This is (0, 2) in tbody 0</td>
        </tr>
        <tr>
          <td>This is (1, 0) in tbody 0</td>
          <td>This is (1, 1) in tbody 0</td>
          <td>This is (1, 2) in tbody 0</td>
        </tr>
        <tr>
          <td>This is (2, 0) in tbody 0</td>
          <td>This is (2, 1) in tbody 0</td>
          <td>This is (2, 2) in tbody 0</td>
        </tr>
        <tr>
          <td>This is (3, 0) in tbody 0</td>
          <td>This is (3, 1) in tbody 0</td>
          <td>This is (3, 2) in tbody 0</td>
        </tr>
        <tr>
          <td colspan="6">This is (0, 2) in tbody 0</td>
        </tr>
        <tr>
          <td colspan="6">This is (1, 2) in tbody 0</td>
        </tr>
      </tbody>
      <tbody class="printer_friendly_tbody">
        <tr>
          <td class="tbody_first" colspan="6">This is the beginning of a new picture. This must be the first in the groupof tbody 1</td>
        </tr>
        <tr>
          <th colspan="3.0" rowspan="5">
            <img src="images/pdf_download.png" width="300px" />
          </th>
          <td>Random text</td>
          <td>Random text</td>
          <td>Random text</td>
        </tr>
        <tr>
          <td>This is (0, 0) in tbody 1</td>
          <td>This is (0, 1) in tbody 1</td>
          <td>This is (0, 2) in tbody 1</td>
        </tr>
        <tr>
          <td>This is (1, 0) in tbody 1</td>
          <td>This is (1, 1) in tbody 1</td>
          <td>This is (1, 2) in tbody 1</td>
        </tr>
        <tr>
          <td>This is (2, 0) in tbody 1</td>
          <td>This is (2, 1) in tbody 1</td>
          <td>This is (2, 2) in tbody 1</td>
        </tr>
        <tr>
          <td>This is (3, 0) in tbody 1</td>
          <td>This is (3, 1) in tbody 1</td>
          <td>This is (3, 2) in tbody 1</td>
        </tr>
        <tr>
          <td colspan="6">This is (0, 2) in tbody 1</td>
        </tr>
        <tr>
          <td colspan="6">This is (1, 2) in tbody 1</td>
        </tr>
      </tbody>
    </table>
  </body>
 </html>

根据SO的建议,我对tbody中应该放在一起的行进行了分组,并将打印介质的tbody属性设置为:

.printer_friendly_tbody {
    background-color:aliceblue;
    page-break-inside:avoid;
    page-break-before:auto;
    page-break-after:auto;

}

我想把tbody行放在一起,如果需要,在. printer_friendly_tbody之前或之后拆分表。
当我使用Chrome的Print/PDF功能时,这是生成一个完美的PDF,但当使用wkhtmltopdf生成PDF时,它失败了。
我已经尝试了启用和禁用打印介质选项。
你可能会奇怪,为什么我坚持使用wkhtmltopdf,原因是我想使用wkhtmltopdf的其他功能。
你有什么建议吗?

kxeu7u2r

kxeu7u2r1#

我可能已经找到了一个解决方案,或者如果它不是真正的解决方案,它至少是一个变通方案。
我已经创建了一个gist,下面的代码片段。
它正在使用wkhtmltopdf和Chrome的PDF打印选项在所需位置生成带有分页符的PDF。

.printer_friendly {
  page-break-inside: avoid;
  page-break-before: auto;
  page-break-after: auto;
  border: 4px;
  border-block-color: black;
  border-style: solid;
  border-collapse: collapse;
  width: 100%;
}

table.printer_friendly {
  margin-bottom: 15px;
  border-spacing: 0px;
}

.printer_friendly tr:first-of-type {
  height: 55px;
  background-color: blue;
  font-size: larger;
  color: red;
  border-style: none;
}

.printer_friendly tr:first-of-type th {
  border-style: none;
}

.printer_friendly th {
  background-color: lightgoldenrodyellow;
}

.printer_friendly td,
th {
  border: 1px;
  border-block-color: black;
  border-style: solid;
  padding: 5px;
}
<HTML>

<head>
  <title>A nice page</title>
  <link rel="stylesheet" href="screen.css" media="screen" />
  <link rel="stylesheet" href="printer.css" media="print" />
</head>

<body>
  <div> It works with PDF printing of Chrome and with WKHTMLTOPDF if I have the following structure:
    <pre>
                    &lt;table class="printer_friendly"&gt;
                      &lt;tr&gt;
                        &lt;th colspan="6"&gt;This is the beginning of a new picture. This must be the first in the groupof tbody 13&lt;/th&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                        &lt;th colspan="3.0" rowspan="5"&gt;
                          &lt;img src="images/pdf_download.png" width="300px" /&gt;
                        &lt;/th&gt;
                        &lt;th&gt;Random text&lt;/th&gt;
                        &lt;th&gt;Random text&lt;/th&gt;
                        &lt;th&gt;Random text&lt;/th&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                        &lt;td&gt;This is (0, 0) in tbody 13&lt;/td&gt;
                        &lt;td&gt;This is (0, 1) in tbody 13&lt;/td&gt;
                        &lt;td&gt;This is (0, 2) in tbody 13&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                        &lt;td&gt;This is (1, 0) in tbody 13&lt;/td&gt;
                        &lt;td&gt;This is (1, 1) in tbody 13&lt;/td&gt;
                        &lt;td&gt;This is (1, 2) in tbody 13&lt;/td&gt;
                      &lt;/tr&gt;
                    &lt;/table&gt;
                    </pre> and the following css for print media
    <pre>
                    .printer_friendly {
                        page-break-inside:avoid;
                        page-break-before:auto;
                        page-break-after:auto;
                    }</pre>
  </div>
  <table class="printer_friendly">
    <tr>
      <th colspan="6">This is the beginning of a new picture. This must be the first in the groupof tbody 0</th>
    </tr>
    <tr>
      <td colspan="3.0" rowspan="5">
        <img src="images/pdf_download.png" width="300px" />
      </td>
      <td>Random text</td>
      <td>Random text</td>
      <td>Random text</td>
    </tr>
    <tr>
      <td>This is (0, 0) in tbody 0</td>
      <td>This is (0, 1) in tbody 0</td>
      <td>This is (0, 2) in tbody 0</td>
    </tr>
    <tr>
      <td>This is (1, 0) in tbody 0</td>
      <td>This is (1, 1) in tbody 0</td>
      <td>This is (1, 2) in tbody 0</td>
    </tr>
    <tr>
      <td>This is (2, 0) in tbody 0</td>
      <td>This is (2, 1) in tbody 0</td>
      <td>This is (2, 2) in tbody 0</td>
    </tr>
    <tr>
      <td>This is (3, 0) in tbody 0</td>
      <td>This is (3, 1) in tbody 0</td>
      <td>This is (3, 2) in tbody 0</td>
    </tr>
    <tr>
      <td colspan="6">This is (0, 2) in tbody 0</td>
    </tr>
    <tr>
      <td colspan="6">This is (1, 2) in tbody 0</td>
    </tr>
  </table>
  <table class="printer_friendly">
    <tr>
      <th colspan="6">This is the beginning of a new picture. This must be the first in the groupof tbody 1</th>
    </tr>
    <tr>
      <td colspan="3.0" rowspan="5">
        <img src="images/pdf_download.png" width="300px" />
      </td>
      <td>Random text</td>
      <td>Random text</td>
      <td>Random text</td>
    </tr>
    <tr>
      <td>This is (0, 0) in tbody 1</td>
      <td>This is (0, 1) in tbody 1</td>
      <td>This is (0, 2) in tbody 1</td>
    </tr>
    <tr>
      <td>This is (1, 0) in tbody 1</td>
      <td>This is (1, 1) in tbody 1</td>
      <td>This is (1, 2) in tbody 1</td>
    </tr>
    <tr>
      <td>This is (2, 0) in tbody 1</td>
      <td>This is (2, 1) in tbody 1</td>
      <td>This is (2, 2) in tbody 1</td>
    </tr>
    <tr>
      <td>This is (3, 0) in tbody 1</td>
      <td>This is (3, 1) in tbody 1</td>
      <td>This is (3, 2) in tbody 1</td>
    </tr>
    <tr>
      <td colspan="6">This is (0, 2) in tbody 1</td>
    </tr>
    <tr>
      <td colspan="6">This is (1, 2) in tbody 1</td>
    </tr>
  </table>
  <table class="printer_friendly">
    <tr>
      <th colspan="6">This is the beginning of a new picture. This must be the first in the groupof tbody 2</th>
    </tr>
    <tr>
      <td colspan="3.0" rowspan="5">
        <img src="images/pdf_download.png" width="300px" />
      </td>
      <td>Random text</td>
      <td>Random text</td>
      <td>Random text</td>
    </tr>
    <tr>
      <td>This is (0, 0) in tbody 2</td>
      <td>This is (0, 1) in tbody 2</td>
      <td>This is (0, 2) in tbody 2</td>
    </tr>
    <tr>
      <td>This is (1, 0) in tbody 2</td>
      <td>This is (1, 1) in tbody 2</td>
      <td>This is (1, 2) in tbody 2</td>
    </tr>
    <tr>
      <td>This is (2, 0) in tbody 2</td>
      <td>This is (2, 1) in tbody 2</td>
      <td>This is (2, 2) in tbody 2</td>
    </tr>
    <tr>
      <td>This is (3, 0) in tbody 2</td>
      <td>This is (3, 1) in tbody 2</td>
      <td>This is (3, 2) in tbody 2</td>
    </tr>
    <tr>
      <td colspan="6">This is (0, 2) in tbody 2</td>
    </tr>
    <tr>
      <td colspan="6">This is (1, 2) in tbody 2</td>
    </tr>
  </table>
  <table class="printer_friendly">
    <tr>
      <th colspan="6">This is the beginning of a new picture. This must be the first in the groupof tbody 3</th>
    </tr>
    <tr>
      <td colspan="3.0" rowspan="5">
        <img src="images/pdf_download.png" width="300px" />
      </td>
      <td>Random text</td>
      <td>Random text</td>
      <td>Random text</td>
    </tr>
    <tr>
      <td>This is (0, 0) in tbody 3</td>
      <td>This is (0, 1) in tbody 3</td>
      <td>This is (0, 2) in tbody 3</td>
    </tr>
    <tr>
      <td>This is (1, 0) in tbody 3</td>
      <td>This is (1, 1) in tbody 3</td>
      <td>This is (1, 2) in tbody 3</td>
    </tr>
    <tr>
      <td>This is (2, 0) in tbody 3</td>
      <td>This is (2, 1) in tbody 3</td>
      <td>This is (2, 2) in tbody 3</td>
    </tr>
    <tr>
      <td>This is (3, 0) in tbody 3</td>
      <td>This is (3, 1) in tbody 3</td>
      <td>This is (3, 2) in tbody 3</td>
    </tr>
    <tr>
      <td colspan="6">This is (0, 2) in tbody 3</td>
    </tr>
    <tr>
      <td colspan="6">This is (1, 2) in tbody 3</td>
    </tr>
  </table>
  <table class="printer_friendly">
    <tr>
      <th colspan="6">This is the beginning of a new picture. This must be the first in the groupof tbody 4</th>
    </tr>
    <tr>
      <td colspan="3.0" rowspan="5">
        <img src="images/pdf_download.png" width="300px" />
      </td>
      <td>Random text</td>
      <td>Random text</td>
      <td>Random text</td>
    </tr>
    <tr>
      <td>This is (0, 0) in tbody 4</td>
      <td>This is (0, 1) in tbody 4</td>
      <td>This is (0, 2) in tbody 4</td>
    </tr>
    <tr>
      <td>This is (1, 0) in tbody 4</td>
      <td>This is (1, 1) in tbody 4</td>
      <td>This is (1, 2) in tbody 4</td>
    </tr>
    <tr>
      <td>This is (2, 0) in tbody 4</td>
      <td>This is (2, 1) in tbody 4</td>
      <td>This is (2, 2) in tbody 4</td>
    </tr>
    <tr>
      <td>This is (3, 0) in tbody 4</td>
      <td>This is (3, 1) in tbody 4</td>
      <td>This is (3, 2) in tbody 4</td>
    </tr>
    <tr>
      <td colspan="6">This is (0, 2) in tbody 4</td>
    </tr>
    <tr>
      <td colspan="6">This is (1, 2) in tbody 4</td>
    </tr>
  </table>
  <table class="printer_friendly">
    <tr>
      <th colspan="6">This is the beginning of a new picture. This must be the first in the groupof tbody 5</th>
    </tr>
    <tr>
      <td colspan="3.0" rowspan="5">
        <img src="images/pdf_download.png" width="300px" />
      </td>
      <td>Random text</td>
      <td>Random text</td>
      <td>Random text</td>
    </tr>
    <tr>
      <td>This is (0, 0) in tbody 5</td>
      <td>This is (0, 1) in tbody 5</td>
      <td>This is (0, 2) in tbody 5</td>
    </tr>
    <tr>
      <td>This is (1, 0) in tbody 5</td>
      <td>This is (1, 1) in tbody 5</td>
      <td>This is (1, 2) in tbody 5</td>
    </tr>
    <tr>
      <td>This is (2, 0) in tbody 5</td>
      <td>This is (2, 1) in tbody 5</td>
      <td>This is (2, 2) in tbody 5</td>
    </tr>
    <tr>
      <td>This is (3, 0) in tbody 5</td>
      <td>This is (3, 1) in tbody 5</td>
      <td>This is (3, 2) in tbody 5</td>
    </tr>
    <tr>
      <td colspan="6">This is (0, 2) in tbody 5</td>
    </tr>
    <tr>
      <td colspan="6">This is (1, 2) in tbody 5</td>
    </tr>
  </table>
  <table class="printer_friendly">
    <tr>
      <th colspan="6">This is the beginning of a new picture. This must be the first in the groupof tbody 6</th>
    </tr>
    <tr>
      <td colspan="3.0" rowspan="5">
        <img src="images/pdf_download.png" width="300px" />
      </td>
      <td>Random text</td>
      <td>Random text</td>
      <td>Random text</td>
    </tr>
    <tr>
      <td>This is (0, 0) in tbody 6</td>
      <td>This is (0, 1) in tbody 6</td>
      <td>This is (0, 2) in tbody 6</td>
    </tr>
    <tr>
      <td>This is (1, 0) in tbody 6</td>
      <td>This is (1, 1) in tbody 6</td>
      <td>This is (1, 2) in tbody 6</td>
    </tr>
    <tr>
      <td>This is (2, 0) in tbody 6</td>
      <td>This is (2, 1) in tbody 6</td>
      <td>This is (2, 2) in tbody 6</td>
    </tr>
    <tr>
      <td>This is (3, 0) in tbody 6</td>
      <td>This is (3, 1) in tbody 6</td>
      <td>This is (3, 2) in tbody 6</td>
    </tr>
    <tr>
      <td colspan="6">This is (0, 2) in tbody 6</td>
    </tr>
    <tr>
      <td colspan="6">This is (1, 2) in tbody 6</td>
    </tr>
  </table>
  <table class="printer_friendly">
    <tr>
      <th colspan="6">This is the beginning of a new picture. This must be the first in the groupof tbody 7</th>
    </tr>
    <tr>
      <td colspan="3.0" rowspan="5">
        <img src="images/pdf_download.png" width="300px" />
      </td>
      <td>Random text</td>
      <td>Random text</td>
      <td>Random text</td>
    </tr>
    <tr>
      <td>This is (0, 0) in tbody 7</td>
      <td>This is (0, 1) in tbody 7</td>
      <td>This is (0, 2) in tbody 7</td>
    </tr>
    <tr>
      <td>This is (1, 0) in tbody 7</td>
      <td>This is (1, 1) in tbody 7</td>
      <td>This is (1, 2) in tbody 7</td>
    </tr>
    <tr>
      <td>This is (2, 0) in tbody 7</td>
      <td>This is (2, 1) in tbody 7</td>
      <td>This is (2, 2) in tbody 7</td>
    </tr>
    <tr>
      <td>This is (3, 0) in tbody 7</td>
      <td>This is (3, 1) in tbody 7</td>
      <td>This is (3, 2) in tbody 7</td>
    </tr>
    <tr>
      <td colspan="6">This is (0, 2) in tbody 7</td>
    </tr>
    <tr>
      <td colspan="6">This is (1, 2) in tbody 7</td>
    </tr>
  </table>
  <table class="printer_friendly">
    <tr>
      <th colspan="6">This is the beginning of a new picture. This must be the first in the groupof tbody 8</th>
    </tr>
    <tr>
      <td colspan="3.0" rowspan="5">
        <img src="images/pdf_download.png" width="300px" />
      </td>
      <td>Random text</td>
      <td>Random text</td>
      <td>Random text</td>
    </tr>
    <tr>
      <td>This is (0, 0) in tbody 8</td>
      <td>This is (0, 1) in tbody 8</td>
      <td>This is (0, 2) in tbody 8</td>
    </tr>
    <tr>
      <td>This is (1, 0) in tbody 8</td>
      <td>This is (1, 1) in tbody 8</td>
      <td>This is (1, 2) in tbody 8</td>
    </tr>
    <tr>
      <td>This is (2, 0) in tbody 8</td>
      <td>This is (2, 1) in tbody 8</td>
      <td>This is (2, 2) in tbody 8</td>
    </tr>
    <tr>
      <td>This is (3, 0) in tbody 8</td>
      <td>This is (3, 1) in tbody 8</td>
      <td>This is (3, 2) in tbody 8</td>
    </tr>
    <tr>
      <td colspan="6">This is (0, 2) in tbody 8</td>
    </tr>
    <tr>
      <td colspan="6">This is (1, 2) in tbody 8</td>
    </tr>
  </table>
  <table class="printer_friendly">
    <tr>
      <th colspan="6">This is the beginning of a new picture. This must be the first in the groupof tbody 9</th>
    </tr>
    <tr>
      <td colspan="3.0" rowspan="5">
        <img src="images/pdf_download.png" width="300px" />
      </td>
      <td>Random text</td>
      <td>Random text</td>
      <td>Random text</td>
    </tr>
    <tr>
      <td>This is (0, 0) in tbody 9</td>
      <td>This is (0, 1) in tbody 9</td>
      <td>This is (0, 2) in tbody 9</td>
    </tr>
    <tr>
      <td>This is (1, 0) in tbody 9</td>
      <td>This is (1, 1) in tbody 9</td>
      <td>This is (1, 2) in tbody 9</td>
    </tr>
    <tr>
      <td>This is (2, 0) in tbody 9</td>
      <td>This is (2, 1) in tbody 9</td>
      <td>This is (2, 2) in tbody 9</td>
    </tr>
    <tr>
      <td>This is (3, 0) in tbody 9</td>
      <td>This is (3, 1) in tbody 9</td>
      <td>This is (3, 2) in tbody 9</td>
    </tr>
    <tr>
      <td colspan="6">This is (0, 2) in tbody 9</td>
    </tr>
    <tr>
      <td colspan="6">This is (1, 2) in tbody 9</td>
    </tr>
  </table>
  <table class="printer_friendly">
    <tr>
      <th colspan="6">This is the beginning of a new picture. This must be the first in the groupof tbody 10</th>
    </tr>
    <tr>
      <td colspan="3.0" rowspan="5">
        <img src="images/pdf_download.png" width="300px" />
      </td>
      <td>Random text</td>
      <td>Random text</td>
      <td>Random text</td>
    </tr>
    <tr>
      <td>This is (0, 0) in tbody 10</td>
      <td>This is (0, 1) in tbody 10</td>
      <td>This is (0, 2) in tbody 10</td>
    </tr>
    <tr>
      <td>This is (1, 0) in tbody 10</td>
      <td>This is (1, 1) in tbody 10</td>
      <td>This is (1, 2) in tbody 10</td>
    </tr>
    <tr>
      <td>This is (2, 0) in tbody 10</td>
      <td>This is (2, 1) in tbody 10</td>
      <td>This is (2, 2) in tbody 10</td>
    </tr>
    <tr>
      <td>This is (3, 0) in tbody 10</td>
      <td>This is (3, 1) in tbody 10</td>
      <td>This is (3, 2) in tbody 10</td>
    </tr>
    <tr>
      <td colspan="6">This is (0, 2) in tbody 10</td>
    </tr>
    <tr>
      <td colspan="6">This is (1, 2) in tbody 10</td>
    </tr>
  </table>
  <table class="printer_friendly">
    <tr>
      <th colspan="6">This is the beginning of a new picture. This must be the first in the groupof tbody 11</th>
    </tr>
    <tr>
      <td colspan="3.0" rowspan="5">
        <img src="images/pdf_download.png" width="300px" />
      </td>
      <td>Random text</td>
      <td>Random text</td>
      <td>Random text</td>
    </tr>
    <tr>
      <td>This is (0, 0) in tbody 11</td>
      <td>This is (0, 1) in tbody 11</td>
      <td>This is (0, 2) in tbody 11</td>
    </tr>
    <tr>
      <td>This is (1, 0) in tbody 11</td>
      <td>This is (1, 1) in tbody 11</td>
      <td>This is (1, 2) in tbody 11</td>
    </tr>
    <tr>
      <td>This is (2, 0) in tbody 11</td>
      <td>This is (2, 1) in tbody 11</td>
      <td>This is (2, 2) in tbody 11</td>
    </tr>
    <tr>
      <td>This is (3, 0) in tbody 11</td>
      <td>This is (3, 1) in tbody 11</td>
      <td>This is (3, 2) in tbody 11</td>
    </tr>
    <tr>
      <td colspan="6">This is (0, 2) in tbody 11</td>
    </tr>
    <tr>
      <td colspan="6">This is (1, 2) in tbody 11</td>
    </tr>
  </table>
  <table class="printer_friendly">
    <tr>
      <th colspan="6">This is the beginning of a new picture. This must be the first in the groupof tbody 12</th>
    </tr>
    <tr>
      <td colspan="3.0" rowspan="5">
        <img src="images/pdf_download.png" width="300px" />
      </td>
      <td>Random text</td>
      <td>Random text</td>
      <td>Random text</td>
    </tr>
    <tr>
      <td>This is (0, 0) in tbody 12</td>
      <td>This is (0, 1) in tbody 12</td>
      <td>This is (0, 2) in tbody 12</td>
    </tr>
    <tr>
      <td>This is (1, 0) in tbody 12</td>
      <td>This is (1, 1) in tbody 12</td>
      <td>This is (1, 2) in tbody 12</td>
    </tr>
    <tr>
      <td>This is (2, 0) in tbody 12</td>
      <td>This is (2, 1) in tbody 12</td>
      <td>This is (2, 2) in tbody 12</td>
    </tr>
    <tr>
      <td>This is (3, 0) in tbody 12</td>
      <td>This is (3, 1) in tbody 12</td>
      <td>This is (3, 2) in tbody 12</td>
    </tr>
    <tr>
      <td colspan="6">This is (0, 2) in tbody 12</td>
    </tr>
    <tr>
      <td colspan="6">This is (1, 2) in tbody 12</td>
    </tr>
  </table>
  <table class="printer_friendly">
    <tr>
      <th colspan="6">This is the beginning of a new picture. This must be the first in the groupof tbody 13</th>
    </tr>
    <tr>
      <td colspan="3.0" rowspan="5">
        <img src="images/pdf_download.png" width="300px" />
      </td>
      <td>Random text</td>
      <td>Random text</td>
      <td>Random text</td>
    </tr>
    <tr>
      <td>This is (0, 0) in tbody 13</td>
      <td>This is (0, 1) in tbody 13</td>
      <td>This is (0, 2) in tbody 13</td>
    </tr>
    <tr>
      <td>This is (1, 0) in tbody 13</td>
      <td>This is (1, 1) in tbody 13</td>
      <td>This is (1, 2) in tbody 13</td>
    </tr>
    <tr>
      <td>This is (2, 0) in tbody 13</td>
      <td>This is (2, 1) in tbody 13</td>
      <td>This is (2, 2) in tbody 13</td>
    </tr>
    <tr>
      <td>This is (3, 0) in tbody 13</td>
      <td>This is (3, 1) in tbody 13</td>
      <td>This is (3, 2) in tbody 13</td>
    </tr>
    <tr>
      <td colspan="6">This is (0, 2) in tbody 13</td>
    </tr>
    <tr>
      <td colspan="6">This is (1, 2) in tbody 13</td>
    </tr>
  </table>
</body>

</HTML>

我希望它能对某人有所帮助!

相关问题