Page-break-after Property usage in CSS

Source: Internet
Author: User
Do you know the Page-break-after attribute usage in CSS2.0, here to you briefly describe, CSS Page-break-after property has auto default, Always,avoid and inherit, and so on a few options, see their specific usage introduction.

Page-break-after attribute usage in CSS2.0

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

Page-break-after has the following options:

Auto Default. If necessary, insert a page break after the element.

Always inserts a page break after the element.

Avoid avoid inserting page breaks after the element.

Left has enough page breaks after the element to go up to a blank page.

Right has enough page breaks after the element to go up to the left of a blank page.

Inherit specifies that the settings for the Page-break-after property should be inherited from the parent element.

The page tabs we use are:

Example code:

<divstyledivstyle= "Page-break-after:always" > <spanstylespanstyle= "Display:none" >&nbsp;</span > </div>

Also, we can set the CSS print style for the table. Here is an example, where each table is printed on a paginated page:

Sample code


In the above example, two tables of data are printed separately on 2 pages in print Preview, which is the effect of using the Page-break-after property.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.