Adobe 提議的 CSS 模塊,實現**內容流動**於多個獨立區域,而非綁定單一容器。四大能力:
.content { flow: "article-thread"; } /* 內容源 */
.region-1, .region-2 { content: from("article-thread"); } /* 區域 */
內容從文檔流移出,依序填充 .region-1 → .region-2... 區域 DOM 位置可不相鄰。
/* CSS */
#source { flow: "main-thread"; }
.region { content: from(main-thread); background: #C5DFF0; }
/* HTML */
<div id="source"><p>Lorem ipsum...</p></div>
<div id="region1" class="region"></div>
<div id="region2" class="region"></div>
<div id="region3" class="region"></div>
content-order 可控制流向順序 (默認文檔順序)。
.heart {
wrap-shape: polygon(150px, 32px, ...更多頂點...);
wrap-shape-mode: content; /* 文字在形狀內部 */
}
.exclusion {
wrap-shape: circle(50% at center); /* 或 polygon */
wrap-shape-mode: around; /* 文字環繞外部 */
}
p { color: gray; }
@region-style #region_1 {
p { color: #0C3D5F; } /* 僅第一區域文字深藍 */
}
break-insidedisplay: contents 解構語義