html - 表头重复打印时下标或上标标签内容丢失

标签 html css printing

enter image description here表头在pdf报告中重复,但上标和下标的内容只显示在第一页,重复时不显示。

有关详细信息,请查看图片。

first Page where content in super or subscript tag is shown

Second Page where content in super or subscript tag is lost

下面是代码

 <table>
          <thead>
            <tr>
              <th>SubLayer No</th>
              <th>Top Elevation (ft)</th>
              <th>Bottom Elevation (ft)</th>
              <th>Layer Thickness (ft)</th>
              <th>
                Total Unit Weight (lb/ft<sup>3</sup>)
              </th>
              <th>Void Ratio</th>
              <th>Friction Angle</th>
              <th>
                Cohesion (lb/ft<sup>2</sup>)
              </th>
              <th>
                Constrained Modulus (lb/ft<sup>2</sup>)
              </th>
              <th>Compression Index</th>
              <th>Recompression Index</th>
              <th>OCR</th>
              <th>
                Maximum Past Stress (lb/ft<sup>2</sup>)
              </th>
              <th>Poisson's Ratio</th>
              <th>Dc/Ds</th>
              <th>
                Soil &sigma;<sub>v</sub> at Mid-Layer (lb/ft<sup>2</sup>)
              </th>
              <th>
                Column &sigma;<sub>v</sub> at Mid-Layer (lb/ft<sup>2</sup>)
              </th>
              <th>
                Unit Cell Area (ft<sup>2</sup>)
              </th>
              <th>
                Column Area (ft<sup>2</sup>)
              </th>
            </tr>
          </thead>
          <tbody>{subLayersView}</tbody>
        </table>

最佳答案

使用 CSS 试试这个

 <style>
        .sup {
        font-size: 60%;
        vertical-align: super; 
        }

 </style>

关于html - 表头重复打印时下标或上标标签内容丢失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55644709/

相关文章:

javascript - 获取我当前的 URL 并使用 JS 将其插入到 html 中

html - 使用@media 显示图像

performance - 如何提高ESC/POS Thermal_Printer图像打印速度?

java - 如何从 Java 方法中打印出一些内容并返回另一个内容?

.net - 使用 .NET PrintDocument 动态纸张高度

html - 将 Bootstrap 导航栏切成两半

javascript - 为什么要 y.innerHTML = x.innerHTML;避免?

css - 为什么设置标签的样式不起作用?

html - 使我隐藏的单选按钮可制表/508 兼容

css - IE/Edge CSS3 Transitions 不适用于 background-position 属性