page-break-after

CSS page-break-after Property

The page-break-after property defines page break after the element.

This property cannot be used on an empty <div> or on absolutely positioned elements.

The page-break-after property is replaced by the break-after property.

Browsers should treat the page-break-after property as an alias of break-after. This assures that sites using the page-break-after property still work as designed.

类目类目
Initial Valueauto
Applies toBlock-level elements.
InheritedNo.
AnimatableNo.
VersionCSS2
DOM Syntaxobject.style.pageBreakAfter = “avoid”;

Syntax

Syntax

page-break-after: auto | avoid | right | left | initial | inherit;

You can insert the following piece of code with page-break-after in your CSS code:

@media print {
  footer {
    page-break-after: left;
  }
}

Values

Values

ValueDescription
autoAllows to insert any page break after the element.
avoidAvoids to insert any page break after the element.
alwaysForces to insert any page break after the element.
leftInsert a page break after the element so that the next page is formatted as a left page.
rightInsert a page break after the element so that the next page is formatted as a right page.
initialSets this property to its default value.
inheritInherits this property from its parent element.


请遵守《互联网环境法规》文明发言,欢迎讨论问题
扫码反馈

扫一扫,反馈当前页面

咨询反馈
扫码关注
返回顶部