Strona stylu BreakAfter Property
Przykład
Zawsze ustawiaj podział strony po każdym elemencie <p> z id="footer":
document.getElementById("footer").style.pageBreakAfter = "always";
Spróbuj sam "
Definicja i użycie
Właściwość pageBreakAfter ustawia lub zwraca zachowanie podziału strony po elemencie (w przypadku drukowania lub podglądu wydruku).
Uwaga: Właściwość pageBreakAfter nie ma wpływu na elementy pozycjonowane bezwzględnie. Podział strony jest widoczny tylko w podglądzie wydruku lub podczas drukowania.
Obsługa przeglądarki
Property | |||||
---|---|---|---|---|---|
pageBreakAfter | Yes | Yes | Yes | Yes | Yes |
Składnia
Zwróć właściwość pageBreakAfter:
object.style.pageBreakAfter
Ustaw właściwość pageBreakAfter:
object.style.pageBreakAfter = "auto|always|avoid|emptystring|left|right|initial|inherit"
Wartości nieruchomości
Value | Description |
---|---|
auto | Insert a page break after the element if necessary. This is default |
always | Always insert a page break after the element |
avoid | Avoid a page break after the element |
"" (empty string) | Page break is not inserted after the element |
left | Insert one or two page breaks after the element, so the next page is considered a left page |
right | Insert one or two page breaks after the element, so the next page is considered a right page |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Szczegóły techniczne
Domyślna wartość: | automatyczny |
---|---|
Wartość zwrotu: | String, reprezentujący zachowanie podziału strony po elemencie podczas drukowania |
Wersja CSS | CSS2 |
Powiązane strony
Odniesienie CSS: page-break-after property
❮ Obiekt stylu