Style pageBreakAfter attribute
- Föregående sida paddingTop
- Nästa sida pageBreakBefore
- Gå tillbaka till föregående nivå HTML DOM Style objekt
Definition and Usage
The pageBreakAfter attribute sets or returns the pagination behavior after the element (used for printing or print preview).
Note:pageBreakAfter
This attribute has no effect on absolutely positioned elements. Pagination symbols are only visible in print preview or when printing.
See also:
CSS Reference Manual:page-break-after attribute
Example
Always set a pagination symbol after each <p> element with id="footer":
document.getElementById("footer").style.pageBreakAfter = "always";
Syntax
Return pageBreakAfter attribute:
object.style.pageBreakAfter
Set pageBreakAfter attribute:
object.style.pageBreakAfter = "auto|always|avoid|emptystring|left|right|initial|inherit"
Attribute value
Value | Description |
---|---|
auto | Insert a pagination symbol after the element if necessary. Default. |
always | Always insert a pagination symbol after the element. |
avoid | Avoid inserting a pagination symbol after the element. |
"" (empty string) | Do not insert a pagination symbol after the element. |
left | Insert enough pagination symbols after the element, until a blank left page. |
right | Insert enough pagination symbols after the element, until a blank right page. |
initial | Set this property to its default value. See initial. |
inherit | Inherit this property from its parent element. See inherit. |
Technical details
Default value: | auto |
---|---|
Return value: | A string that represents the pagination behavior of the element when printed. |
CSS version: | CSS2 |
Webbläsarstöd
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Stöd | Stöd | Stöd | Stöd | Stöd |
- Föregående sida paddingTop
- Nästa sida pageBreakBefore
- Gå tillbaka till föregående nivå HTML DOM Style objekt