[英]HTML / CSS Page break not working
I have this page with multiple records I want to print. 我的页面上有多个要打印的记录。
The problem is that I get a blank page at the end. 问题是我最后得到空白页。
My CSS: 我的CSS:
.break {
page-break-after: always;
}
My html/php: 我的html / php:
...
</table>
<p class="break"> </p>
<?php } while ($row_RSacessorios = mysql_fetch_assoc($RSacessorios)); ?>
</body>
</html>
<?php
mysql_free_result($RSacessorios);
mysql_free_result($RSfases);
?>
I found a simple solution. 我找到了一个简单的解决方案。 I just remove the class "break" on the last record. 我只是删除最后一条记录上的“ break”类。
if ($count < $total_rec) {
<p class="break"> </p>
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.