Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to use the page-break-after property in CSS

Shulou Source: shulou.com Published: 2022-05-31 13:05:05 10月03日 Update

This article mainly introduces the relevant knowledge of "how to use the page-break-after attribute in CSS". The editor shows you the operation process through an actual case. The method of operation is simple and fast, and it is practical. I hope this article "how to use the page-break-after attribute in CSS" can help you solve the problem.

Usage of page-break-after attribute in CSS2.0

Page-break-after is the CSS property used in CSS to set print paging and supports all browsers.

Page-break-after has the following options:

◆ auto defaults. Insert a page break after the element if necessary.

◆ always inserts a page break after the element.

◆ avoid avoids inserting page breaks after elements.

◆ left has enough page breaks after the element to a blank left page.

◆ right has enough page breaks after the element all the way to a blank right page.

The ◆ inherit states that the setting of the page-break-after attribute should be inherited from the parent element.

Our commonly used paging tags are:

Sample code:

We can also set the CSS print style of the table. Here is an example, where each table is printed in pages:

Sample code

@ mediaprint {table {page-break-after:always;}} * tables * * the second table, the second table, the second table about "how to use the page-break-after attribute in CSS", thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Tags: Attributes elements tables knowledge code examples blanks industries different practical necessary useful content examples practical practical commonly used articles methods more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Apple MySQL OPPO Reno Shulou Technology