翻译正在进行中。

break-inside CSS 属性描述了在多列布局页面下的内容盒子如何中断,如果多列布局没有内容盒子,这个属性会被忽略。

break-inside: auto;
break-inside: avoid;
break-inside: avoid-page;
break-inside: avoid-column;
break-inside: avoid-region;

在每一个元素的边界,都可能生成一个中断点,这些中断点由三个属性来定义。break-after 属性定义之前元素的中断点,break-before 定义了之后元素的中断点, break-inside 定义了当前元素的中断点。

如果需要定义一个中断点,必须遵循以下原则:

  1. 如果这三个中断属性的值有一个是强制中断值(这些强制中断值包括了 always, left, right, page, column, region),那么这个属性的值就具有优先权。 If several of the concerned values is such a break, the one of the element that appears the latest in the flow is taken (that is the break-before value has precedence over the break-after value, which itself has precedence over the break-inside value).
  2. If any of the three concerned values is an avoid break value, that is avoid, avoid-page, avoid-region, avoid-column, no such break will be applied at that point.

Once forced breaks have been applied, soft breaks may be added if needed, but not on element boundaries that resolve in a corresponding avoid value.

初始值auto
适用元素block-level elements
是否是继承属性
适用媒体paged
计算值as specified
Animation typediscrete
正规顺序the unique non-ambiguous order defined by the formal grammar

Syntax

Values

auto
Allows, meaning neither forbid nor force, any break (either page, column or region) to be be inserted within the principle box.
avoid-page
Avoid any page break within the principle box.
avoid-column
Avoid any column break within the principle box.
avoid-region
Avoid any region break within the principle box.

Formal syntax

auto | avoid | avoid-page | avoid-column | avoid-region

Specifications

Specification Status Comment
CSS Fragmentation Module Level 3
break-inside
Candidate Recommendation  
CSS Regions Module Level 1
break-inside
Working Draft Extends the property to handle region breaks.
CSS Multi-column Layout Module
break-inside
Working Draft Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support 50Edge Full support 12Firefox No support NoIE Full support 10Opera Full support 37
Full support 37
No support 11.1 — 12.1
Safari Full support 10WebView Android Full support 50Chrome Android Full support 50Edge Mobile Full support YesFirefox Android No support NoOpera Android ? Safari iOS Full support 10Samsung Internet Android Full support 5.0
column and avoid-columnChrome No support NoEdge No support NoFirefox No support NoIE Full support 10Opera No support 11.1 — 12.1Safari No support NoWebView Android No support NoChrome Android ? Edge Mobile No support NoFirefox Android No support NoOpera Android ? Safari iOS No support NoSamsung Internet Android No support No
recto and verso
Experimental
Chrome No support NoEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android ? Edge Mobile No support NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
region and avoid-region
Experimental
Chrome No support NoEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android ? Edge Mobile No support NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
 

文档标签和贡献者

此页面的贡献者: xyy94813, SheltonDong
最后编辑者: xyy94813,