CSSPerspective
Baseline 2026>
Newly available
Since November 2026, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Note: This feature is available in Web Workers.
The CSSPerspective interface of the CSS Typed Object Model API represents the perspective() value of the individual transform property in CSS.
Constructor
CSSPerspective()-
Creates a new
CSSPerspectiveobject.
Instance properties
Also inherits properties from its parent interface, CSSTransformComponent.
length-
Returns or sets the distance from z=0.
Instance methods
Also inherits methods from its parent interface, CSSTransformComponent.
Examples
To do
Specifications
| Specification |
|---|
| CSS Typed OM Level 1> # cssperspective> |