Home > Web Front-end > CSS Tutorial > Detailed explanation of paging printing using page-break-before and page-break-after in css

Detailed explanation of paging printing using page-break-before and page-break-after in css

黄舟
Release: 2017-07-08 10:36:45
Original
3830 people have browsed it

page-break-before and page-break-after CSSproperties will not modify the display of the web page on the screen. These two properties are Used to control how files are printed. Each printing attribute can be set to 4 setting values: auto, always, left and right. Among them, Auto is the default value. You only need to set the page break symbol (Page breaks) when necessary. If page-break-before is set to always, the printer will restart a new printing page when encountering a specific component. If page-break-before is set to left, page break symbols will be inserted until the specified component appears on a left blank page. If page-break-before is set to right, page break symbols will be inserted until the specified component appears on a blank page on the right. The page-break-after attribute will add the page break symbol after the specified component, not before. In the following

program you will be able to see the settings of these properties,

<HTML>
<HEAD>
<TITLE>Listing 14-4</TITLE>
</HEAD>
<BODY>
<DIV>This is the first DIV.</DIV>
<DIV STYLE="page-break-before:always">This is the second DIV.</DIV>
<DIV STYLE="page-break-after:always">This is the third DIV.</DIV>
<DIV>This is the fourth DIV.</DIV>
<DIV STYLE="page-break-before:right">This is the fifth DIV.</DIV>
<DIV STYLE="page-break-after:right">This is the sixth DIV.</DIV>
<DIV>This is the last DIV.</DIV>
</BODY>
</HTML>
Copy after login

Available values

Detailed explanation of paging printing using page-break-before and page-break-after in css

The above is the detailed content of Detailed explanation of paging printing using page-break-before and page-break-after in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template