微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

tbody 线重叠 tfoot

如何解决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 举报,一经查实,本站将立刻删除。