gpt4 book ai didi

html - 在所有页面上使用两个线程打印表头

转载 作者:太空宇宙 更新时间:2023-11-04 14:36:07 25 4
gpt4 key购买 nike

我想在每一页上打印一个带有双标题的表格。在第一页上它运行良好,但在接下来的页面上它只打印第一个标题。

CSS

@media print {
thead {
display: table-header-group;
}
}

我的表格的 HTML。

<tr>
<thead>
<th colspan="2">A</th>
<th>B</th>
<th>C</th>
<thead>
<th>1</th>
<th colspan="2">2</th>
<th>3</th>
</tr>

感谢您的帮助。

我尝试向第二个 thead 添加一个类,然后将其分组在 css 中而不是 thead -> .className 但它不起作用。我得到了相同的结果。

最佳答案

试试这个,

<thead>
<tr>
<th colspan="2">A</th>
<th>B</th>
<th>C</th>
</tr>
<tr>
<th>1</th>
<th colspan="2">2</th>
<th>3</th>
</tr>
</thead>

关于html - 在所有页面上使用两个线程打印表头,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18735035/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com