perspective() CSS Function
perspective() CSS function determines the distance from the screen plane to the point of convergence of the lines, thereby determines how pronounced the effect of perspective. The default convergence point is located in the center of the element and can be changed using the perspective-origin property.
perspective() = perspective( <size>)
- sizeIs a <length> representing the distance from the user to the z=0 plane. If it is 0 or a negative value, no perspective transform is applied.
<p>Hover over the image</p>
<img class="perspective" src="images/nature.jpg" alt="Perspective">
transform: perspective(200px) translateZ(60px);
|Tablets / Mobile|
Last updated by CSSPortal on: 1st December 2019