A scale transform the element by using z-axis with CSS3

CSSWeb DevelopmentFront End Technology

<p>The scaleZ(z) method is used to scale transform the element using Z-axis.</p><p>Let us see the syntax &minus;</p><pre class="result notranslate">scaleZ(z)</pre><p>Here, z is a number representing the scaling factor to apply on the z-coordinate of each point of the element.</p><p>Let us see an example &minus;</p><pre class="prettyprint notranslate">div { &nbsp; &nbsp;width: 60px; &nbsp; &nbsp;height: 60px; &nbsp; &nbsp;background-color: black; } .perspective { &nbsp; &nbsp;transform: perspective(200px) translateZ(-150px); &nbsp; &nbsp;background-color: yellow; } .scaled-translated { &nbsp; &nbsp;transform: perspective(200px) scaleZ(2) translateZ(-150px); &nbsp; &nbsp;background-color: orange; }</pre>
raja
Updated on 20-Jun-2020 08:57:55

Advertisements