Style perspective Property
Style perspective Property
The perspective property is used for specifying how many pixels a 3D element is placed from the view. It allows us to change the perspective on how 3D elements are viewed. In this, the child element will get a perspective view, not the element itself and it only works on 3D transformed elements.
Syntax:-
Its syntax is:- object.style.perspective OR object.style.perspective = length | none
Return:-
Its return is:- string having perspective property of an element
Further Explanation:-
Value | Description |
---|---|
length | How far element is placed from the view. |
none | The perspective is not set. |
initial | Sets property to its default value. |
inherit | Inherits property from its parent element. |