小编Per*_*rOl的帖子

打印预览在每页上重复tfoot

我的问题是,我有两个不同的html文件,其中包含一个包含theader,tfooter和tbody的表.

第一个是我自己创建的测试原因,它看起来像这样:

<html>
<head>
    <title>The Invoice</title>
    <style type="text/css">

    table.invoice { background-color: #dddddd; font-family: sans-serif; }

    td, th { background-color: #ffffff; padding: 5pt; }
    td.unit { text-align: right; }
    td.price { text-align: right; }

    thead { display: table-header-group; }
    tfoot th { text-align: right; }

    </style>
</head>
<body>
    <div style="width:auto !important; overflow:hidden; position:relative">
    <table class="invoice" cellspacing="1" cellpadding="0">
        <thead>
           <th>Unit</th>
           <th>Description</th>
           <th>Price</th>
        </thead>
        <tfoot>
           <tr>
             <th colspan="2">Sum</th>
             <td class="price">1.230,32 EUR</td>
           </tr>
        </tfoot>
        <tbody> 
               <tr><td>1</td><td>Excel</td><td >150,00 EUR</td></tr>
               <tr><td>2</td><td>Document</td><td>150,00 EUR</td></tr>
                            ... and so on …
Run Code Online (Sandbox Code Playgroud)

html css

9
推荐指数
2
解决办法
6096
查看次数

标签 统计

css ×1

html ×1