O'Reilly logo

CSS Pocket Reference, 4th Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

perspective

Values:

none | <number>

Initial value:

none

Applies to:

Block-level and inline-level elements

Inherited:

No

Computed value:

Same as declared value

Description:

Defines the amount of apparent 3D perspective of an element’s transformed children, but not for the element itself. Numbers define a foreshortening depth in pixels; smaller numbers define more extreme perspective effects. Negative values are treated the same as none.

Examples:

body {perspective: 250;} /* middlin' */
#wrapper {perspective: 10;} /* extreme */

Note:

As of early 2011, this property was only supported in a prefixed form by WebKit.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required