HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

perspective

Description

The perspective function for CSS specifies a perspective projection matrix.

This matrix scales points in X and Y based on their Z value, scaling points with positive Z values away from the origin, and those with negative Z values towards the origin. Points on the z=0 plane are unchanged. The parameter represents the distance of the z=0 plane from the viewer. Lower values give a more flattened pyramid and therefore a more pronounced perspective effect. If the depth value is less than 1px, it must be treated as 1px for the purpose of rendering, for computing the resolved value of transform, and when used as the endpoint of interpolation.

Syntax

CSS

perspective()

Values

<perspective()> =
    perspective(
        [ <length [0,∞]> | none ]
    )
<length>

Specifies the length using a number followed by a unit of measurement.

none

Specifies a missing component.

Examples

1 · length

2 · none

3 · JS