Esta propriedade foi substituída pela propriedade
break-before
.A propriedade CSS page-break-before
ajusta as "quebras de páginas" antes do elemento atual.
Esta propriedade aplica-se para elementos em bloco (block) que geram uma caixa. Não será aplicada em uma <div>
vazia que não irá gerar uma caixa (box).
/* Keyword values */
page-break-before: auto;
page-break-before: always;
page-break-before: avoid;
page-break-before: left;
page-break-before: right;
page-break-before: recto;
page-break-before: verso;
/* Global values */
page-break-before: inherit;
page-break-before: initial;
page-break-before: unset;
Initial value | auto |
---|---|
Aplica-se a | block-level elements in the normal flow of the root element. User agents may also apply it to other elements like table-row elements. |
Inherited | não |
Computed value | as specified |
Animation type | discrete |
Page break aliases
A propriedade page-break-before
agora é uma propriedade legada, substituída por break-before
.
Por motivos de compatibilidade, page-break-before
é tratada pelos navegadores como um alias de break-before
. Isso garante que sites usando page-break-before
continuem a funcionar. Um subconjunto de valores deve manter aliases como a seguir:
page-break-before | break-before |
---|---|
auto |
auto |
left |
left |
right |
right |
avoid |
avoid |
always |
page |
Syntax
Values
auto
- Initial value. Automatic page breaks (neither forced nor forbidden).
always
- Always force page breaks before the element.
avoid
- Avoid page breaks before the element.
left
- Force page breaks before the element so that the next page is formatted as a left page.
right
- Force page breaks before the element so that the next page is formatted as a right page.
recto
- If pages progress left-to-right, then this acts like
right
. If pages progress right-to-left, then this acts likeleft
. verso
- If pages progress left-to-right, then this acts like
left
. If pages progress right-to-left, then this acts likeright
.
Formal syntax
Examples
/* avoid page break before the div */
div.note {
page-break-before: avoid;
}
Specification
Specification | Status | Comment |
---|---|---|
CSS Logical Properties and Values Level 1 The definition of 'recto and verso' in that specification. |
Rascunho editorial | Adds the values recto and verso . |
CSS Paged Media Module Level 3 The definition of 'page-break-before' in that specification. |
Rascunho atual | Extends the element that this property applies to table rows and table row groups. |
CSS Level 2 (Revision 1) The definition of 'page-break-before' in that specification. |
Recomendação | Initial definition |
Browser compatibility
BCD tables only load in the browser
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.