The matrix3d() function in CSS is used to define a 4x4 homogeneous 3D transformation matrix.
Example
<!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 −
<!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>