CSS perspective property

Description

CSS perspective property esatablishes a new stacking context and allows the 3-D transformation of children elements. Remember that it applies to the transform children elements and not the element itself.

In the demo, we apply 'perspective' property to the element. But its effect is visible on the children elements.

Syntax

perspective : none | length

Property values

noneDefault

In this case, no perspective is applied.

perspective: none;

length

It translates the box by 50px along Y-axis.

perspective: 300px;

Applicable to

It applies to transformable elements.

#CSS digger
Was this article helpful?

 
We are learning perspective property.
×

Ctrl+D