Home > Article > Web Front-end > How to use css page-break-inside property
css page-break-inside attribute is used to set the page-breaking behavior inside the element. Although you can use always to force page breaks, there is no guarantee to avoid the insertion of page breaks. The most the creator can do is ask the user agent to try as much as possible Avoid inserting page breaks.
How to use the css page-break-inside attribute?
Function: The page-break-inside attribute sets the page inside the element -breaking behavior.
Note: Although you can use always to force page breaks, there is no guarantee that the insertion of page breaks will be avoided. The most the creator can do is ask the user agent to avoid inserting page breaks as much as possible. Applies to: non-floating block-level elements whose position value is relative or static.
Note: Only the Opera browser supports the page-break-inside attribute.
css page-break-inside property usage example
<html> <head> <style> @media print { table {page-break-inside:avoid;} } </style> </head> <body> .... </body> </html>
Effect output:
The above is the detailed content of How to use css page-break-inside property. For more information, please follow other related articles on the PHP Chinese website!