The perspective() function is an inbuilt function in CSS which is used with transform property to set the perspective effect on images.
perspective( length );
Parameters: This function accepts single parameter length which is used to hold the value of perspective level. The length value represents the distance from user to z=0 plane. It is mandatory parameter.
Return value: It makes the image perspective on the basis of user define value.
Below example illustrates the perspective() function in CSS:
Supported browser: The browser supported by CSS | perspective() function are listed below:
- Google Chrome
- Internet Explorer/ Microsoft Edge
- Mozila Firefox
- CSS | perspective Property
- CSS perspective-origin Property
- HTML | DOM Style perspective Property
- How to override the CSS properties of a class using another CSS class ?
- Difference between bootstrap.css and bootstrap-theme.css
- CSS | rgb() Function
- CSS | rgba() Function
- CSS | hsla() Function
- CSS | hsl() Function
- CSS | cubic-bezier() Function
- CSS | calc() Function
- CSS | attr() Function
- CSS | linear-gradient() Function
- CSS | radial-gradient() Function
- CSS | repeating-radial-gradient() Function
- CSS | repeating-linear-gradient() Function
- CSS | animation-timing-function Property
- CSS | var() Function
- CSS | brightness() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.