HTML TABLE分页符 [英] HTML TABLE page break

查看:79
本文介绍了HTML TABLE分页符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我面临着打印大桌子的问题。我有html表,大约600行,打印时跨越多个页面。在每个分页符行未正确结束。该行的一半被剪切并显示在下一页。



我尝试使用下面的CSS但是没有工作



table {page-break-inside:auto}

tr {page-break-inside:avoid; page-break-after:auto}

thead {display:table-header-group}

tfoot {display:table-footer-group}



[也试试这个]

推荐答案

page-break-inside:avoid;如果桌子可以装入页面,则只能工作。如果你不能进入一个页面的表,它将无法正常工作。



作为一种解决方法,你可以使用,page-break-before:总是



但是,桌子必须装在一个页面上。



您可以查看此链接以获得更多说明。 [ ^ ]
page-break-inside:avoid; can only work, if the table can be fitted into a page. If the table you cant fit into a page, it will not work.

As a work around you can use, page-break-before: always

But, table should must be fitted with in a page.

You can check this link for more clarification.[^]


这篇关于HTML TABLE分页符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆