该页面暂无翻译,已显示英文版本。
Position
Position mode enumeration
Controls how an element is positioned within its parent container.
This corresponds to the CSS position property.
Example
import { Style, Position } from "taffy-layout"; const style = new Style(); style.position = Position.Relative; // Normal document flow style.position = Position.Absolute; // Removed from flow, uses inset values
Enumeration Members
| Enumeration Member | Value | Description |
|---|---|---|
Absolute | 1 | Element is positioned relative to its nearest positioned ancestor |
Relative | 0 | Element participates in normal document flow |