tbody 线重叠 tfoot

问题描述

我正在处理一份有表格的报告。 在其中一行中有太多文本使该行在打印时很长大约需要两页,但是当我想打印它时,表格正文线与表格页脚重叠

我的风格

        <style>
            @media print {

                table { overflow: visible !important; }
thead { display: table-header-group }
tr { page-break-inside: auto }

            }

            #main_table,#id_table {
                border: 2px solid black;
                border-collapse: collapse;
            }

 
            }
        </style>

我的身体

    <body>
        <table id="main_table" dir="rtl" style="width: 95%;text-align:center; margin: 0 auto;" border="1">

            <thead>
                <tr>
                    <th colspan="3">
                        <div class="page" style="align-content: center">
                            <img src="{{URL::asset("img/logo.jpg")}}" style="width: 90%">
                        </div>
                    </th>
                </tr>
            </thead>
            <tbody>

                <tr style="font-size: 18px;font-weight:bold;height:40px">
                    <td style="width: 47.5%">سوال</td>
                    <td style="width: 4%">تاریخ</td>
                    <td style="width: 47.5%">جواب</td>
                </tr>
                <tr>
                    <td style="border-bottom: hidden;text-align:right">
                        <p style="text-align: right;font-size: 19px;margin-right:30px;font-weight:bold">
                            {{$result[0]->name}}</p>
                    </td>
                    <td rowspan="3" style="width:4%;font-size:16px;-webkit-transform: rotate(-90deg);">
                        1399
                    </td>
                    <td rowspan="3" id="ssss"></td>
                </tr>
                <tr>
                    @if(strlen($result[0]->document_text)<=977) <td
                        style="vertical-align: top;border-top:hidden;height:61vh" dir="rtl">
                        @else
                        <td id="main_td" style="vertical-align: top;border-top:hidden;" dir="rtl">
                            @endif
                            <p class="main_paragraph" dir="rtl" lang="ar">{{$result[0]->document_text}}
                            </p>
                        </td>
                </tr>
                <tr>
                    <td style="vertical-align: top;border-top:hidden;" dir="rtl">
                        <p style="font-size: 16px;font-weight:bold">با احترام</p>
                        <br>
                        <p style="font-size: 19px;font-weight:bold">{{$result[0]->name_dari}}</p>
                        <p style="font-size: 19px;font-weight:bold">{{$result[0]->job_title_dari}}</p>
                    </td>
                </tr>
            </tbody>
            <tfoot >
                <tr>
                    <td colspan="3" style=";opacity:0.90;z-index: 1000;">
                        <div class="export-table" >
                            <hr style="width: 85%;border-radius: 5px;border: 2px solid;margin-left:6%" />
                            <p style="margin-right:25px;margin-left:25px;font-size:12px" dir="rtl">
                                                                adfsdf asdf asd fasd f
                            </div>
                    </td>
                </tr>
            </tfoot>
        </table>
    </body>
</html>

如何删除或隐藏这些行?

我尝试为 tfoot 添加背景颜色,但没有奏效

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)