该页面暂无翻译,已显示英文版本。
TextAlign
Text alignment enumeration (for block layout)
Used by block layout to implement the legacy behaviour of <center> and
<div align="left | right | center">.
Example
import { Style, TextAlign } from "taffy-layout"; const style = new Style(); style.textAlign = TextAlign.LegacyCenter; // Center block children
Enumeration Members
| Enumeration Member | Value | Description |
|---|---|---|
Auto | 0 | No special legacy text align behaviour |
LegacyCenter | 3 | Corresponds to -webkit-center or -moz-center in browsers |
LegacyLeft | 1 | Corresponds to -webkit-left or -moz-left in browsers |
LegacyRight | 2 | Corresponds to -webkit-right or -moz-right in browsers |