如何应用CSS page-break打印一个有很多行的表? [英] How to apply CSS page-break to print a table with lots of rows?
本文介绍了如何应用CSS page-break打印一个有很多行的表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的网页中有一个动态表,有时包含大量行。我知道有 page-break-before
和 page-break-after
CSS属性。
如果需要,我将它们放在我的代码中以强制分页。
I have a dynamic table in my web page that sometimes contains lots of rows. I know there are page-break-before
and page-break-after
CSS properties.
Where do I put them in my code in order to force page breaking if needed?
推荐答案
<style type="text/css">
table { page-break-inside:auto }
tr { page-break-inside:avoid; page-break-after:auto }
</style>
这篇关于如何应用CSS page-break打印一个有很多行的表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文