This property has been replaced by the break-before 特性。

page-break-before CSS property adjusts page breaks before the current element.

This property applies to block elements that generate a box. It won't apply on an empty <div> that won't generate a 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;
				

句法

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 like left .
verso
If pages progress left-to-right, then this acts like left . If pages progress right-to-left, then this acts like right .

Page break aliases

page-break-before property is now a legacy property, replaced by break-before .

For compatibility reasons, page-break-before should be treated by browsers as an alias of break-before . This ensures that sites using page-break-before continue to work as designed. A subset of values should be aliased as follows:

page-break-before break-before
auto auto
left left
right right
avoid avoid
always page

形式定义

初始值 auto
适用于 block-level elements in the normal flow of the root element. User agents may also apply it to other elements like table-row elements.
继承 no
计算值 如指定
动画类型 discrete

形式句法

auto | always | avoid | left | right | recto | verso
					

范例

Avoid a page break before an element

/* avoid page break before div elements of class note */
div.note {
    page-break-before: avoid;
}
					

规范

规范 状态 注释
CSS Logical Properties and Values Level 1
The definition of 'recto and verso' in that specification.
编者草案 Adds the values recto and verso .
CSS Paged Media Module Level 3
The definition of 'page-break-before' in that specification.
工作草案 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.
推荐 初始定义

浏览器兼容性

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. 更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
page-break-before Chrome 完整支持 1 Edge 完整支持 12 Firefox 完整支持 1 注意事项
完整支持 1 注意事项
注意事项 The values avoid , left ,和 right are unsupported.
IE 完整支持 4 Opera 完整支持 7 Safari 完整支持 1.2 WebView Android 完整支持 37 Chrome Android 完整支持 18 Firefox Android 完整支持 4 注意事项
完整支持 4 注意事项
注意事项 The values avoid , left ,和 right are unsupported.
Opera Android 完整支持 14 Safari iOS 完整支持 1 Samsung Internet Android 完整支持 1.0

图例

完整支持

完整支持

见实现注意事项。

见实现注意事项。

另请参阅

元数据

  • 最后修改: