我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译!
您也可以阅读此文章的English (US)版。

The page-break-inside CSS property adjusts page breaks inside the current element.

/* Keyword values */
page-break-inside: auto;
page-break-inside: avoid;

/* Global values */
page-break-inside: inherit;
page-break-inside: initial;
page-break-inside: unset;

Initial valueauto
Applies toblock-level elements in the normal flow of the root element. User agents may also apply it to other elements like table-row elements.
Mediavisual, paged
Computed valueas specified
Animation typediscrete
Canonical orderthe unique non-ambiguous order defined by the formal grammar



Initial value. Automatic page breaks (neither forced nor forbidden).
Avoid page breaks inside the element.

Formal syntax

auto | avoid


/* avoid page break inside the paragraph */
p { page-break-inside: avoid;  } 


Specification Status Comment
CSS Paged Media Module Level 3
The definition of 'page-break-inside' in that specification.
Working Draft Allows this property on more elements.
CSS Level 2 (Revision 1)
The definition of 'page-break-inside' in that specification.
Recommendation Initial definition.

Browser compatibility

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 1.0 (Yes) 19 (19) [1] 8.0 7.0 1.3 (312)
Feature Android Edge Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support ? (Yes) 19.0 (19) [1] ? ? ?

[1] Until Firefox 25, page-break-inside: avoid wasn't working with the height of a block.

See also


 最后编辑者: sblotner,