Styl stránkyBreakBefore Property
Příklad
Vždy nastavte konec stránky před každým prvkem <p> s id="footer":
document.getElementById("footer").style.pageBreakBefore = "always";
Zkus to sám "
Definice a použití
Vlastnost pageBreakBefore nastavuje nebo vrací chování zalomení stránky před prvkem (pro tisk nebo náhled tisku).
Poznámka: Vlastnost pageBreakBefore nemá žádný vliv na absolutně umístěné prvky. Konec stránky je viditelný pouze v náhledu tisku nebo při tisku.
Podpora prohlížeče
Property | |||||
---|---|---|---|---|---|
pageBreakBefore | Yes | Yes | Yes | Yes | Yes |
Syntax
Vraťte vlastnost pageBreakBefore:
object.style.pageBreakBefore
Nastavte vlastnost pageBreakBefore:
object.style.pageBreakBefore = "auto|always|avoid|emptystring|left|right|initial|inherit"
Hodnoty vlastností
Value | Description |
---|---|
auto | Insert a page break before the element if necessary. This is default |
always | Always insert a page break before the element |
avoid | Avoid a page break before the element |
"" (empty string) | Page break is not inserted before the element |
left | Insert one or two page breaks before the element, so the next page is considered a left page |
right | Insert one or two page breaks before 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 |
Technické údaje
Výchozí hodnota: | auto |
---|---|
Návratová hodnota: | Řetězec představující chování zalomení stránky před prvkem při tisku |
Verze CSS | CSS2 |
Související stránky
CSS reference: vlastnost page-break-before
❮ Objekt stylu