The CSS3 matrix3d() Function

CSSWeb DevelopmentFront End Technology

The matrix3d() function in CSS is used to define a 4x4 homogeneous 3D transformation matrix.

Example

 Live Demo

<!DOCTYPE html>
<html>
<head>
<style>
.demo_img {
   transform: matrix3d(1,1,0,0,0,1,0,0,0,0,1,0,1,100,0,1);
}
</style>
</head>
<body>
<h1>Learn</h1>
<p>Learn Apache Spark</p>
<img class="demo_img" src=
"https://www.tutorialspoint.com/machine_learning/images/machine-learning-mini-logo.jpg" alt="Apache Spark">
</body>
</html>

Output

Example

Let us see another example −

 Live Demo

<!DOCTYPE html>
<html>
<head>
<style>
.demo_img {
   transform: matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,50,-100,0,1.1);
</style>
</head>
<body>
<h1>Learn</h1>
<p>Learn Apache Spark</p>
<img class="demo_img" src=
"https://www.tutorialspoint.com/machine_learning/images/machine-learning-mini-logo.jpg" alt="Apache Spark">
</body>
</html>

Output

raja
Published on 27-Dec-2019 09:55:03
Advertisements