🍋
Menu
CSS

Text Wrap Balance

CSS text-wrap: balance

A text layout mode that distributes text evenly across lines to avoid orphaned short final lines in headings.

技術的詳細

CSS text wrap balance is part of the CSS specification maintained by the W3C CSS Working Group. Browser rendering engines (Blink, WebKit, Gecko) implement the specification through their layout and paint pipeline stages. Understanding the rendering pipeline — Style → Layout → Paint → Composite — is key to writing performant CSS. Properties that trigger layout recalculation (width, height, margin) are more expensive than those that only trigger compositing (transform, opacity).

```css
/* Example: Text Wrap Balance */
.element {
  /* Apply text wrap balance to this element */
  display: block;
  margin: 0 auto;
}
```

関連ツール

関連用語