perspective

Introduction

The perspective CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective.

Examples

Syntax

/* Keyword value */
perspective: auto;

/* <length> values */
perspective: 20px;
perspective: 3.5em;

Values

  • auto Default value

  • [<length>] specifies the observer's distance from the z=0 plane

perspective = auto | <length [0,∞]>

Formal definition

Initial valueempty value
Applies toall elements
Inheritedno
Animatableno

Formal syntax

perspective = auto | <length [0,∞]>

Differences from Web

  • Different from Web, the Perspective property in Lynx takes effect on the current node, while in Web, the Perspective property takes effect on child nodes.

Compatibility

LCD tables only load in the browser

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.