The CSS3 scale3d() Function

CSSWeb DevelopmentFront End Technology

The scale3d() function is used to scale an element in 3D space. The element is scaled based on numbers set as parameter.

Example

 Live Demo

<!DOCTYPE html>
<html>
<head>
<style>
.scale3d_img {
   transform: scale3d(0.5, 1, 1.7);
}
</style>
</head>
<body>
<h1>Learn</h1>
<p>Learn Apache Spark</p>
<img class="scale3d_img" src=
"https://www.tutorialspoint.com/apache_spark/images/apache-spark-mini-logo.jpg"
alt="Apache Spark">
</body>
</html>

Output

Example

Let us now see another example −

 Live Demo

<!DOCTYPE html>
<html>
<head>
<style>
.scale3d_img {
   transform: scale3d(-1.4, 0.4, 0.7);
}
</style>
</head>
<body>
<h1>Learn</h1>
<p>Learn Apache Spark</p>
<img class="scale3d_img" src=
"https://www.tutorialspoint.com/apache_spark/images/apache-spark-mini-logo.jpg"
alt="Apache Spark">
</body>
</html>

Output

raja
Published on 27-Dec-2019 09:43:52
Advertisements