CSS perspective Property

Perspective is the representation of 3D objects on a 2D plane to give the appearance depth and distance in relation to each other. CSS perspective property is used to give perspective to 3D objects. When defining the perspective property, child element gets perspective, not the parent element. So, the value defines how close the child is from the Z plane.

The perspective property is used to give a 3D-positioned element some perspective.

The perspective property defines how far the object is away from the user. So, a lower value will result in a more intensive 3D effect than a higher value.

When defining the perspective property for an element, it is the CHILD elements that get the perspective view, NOT the element itself.

CSS Syntax

perspective: length|none;

Supported Browsers: The browser supported by property are listed below:

  • Chrome
  • Android
  • Firefox (Gecko)
  • Firefox Mobile (Gecko)
  • Internet Explorer (IE)
  • IE Phone
  • Opera
  • Opera Mobile
  • Safari (WebKit)
  • Safari Mobile

Example -