Computer >> คอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS

ฟังก์ชัน CSS3 matrix3d()


ฟังก์ชัน matrix3d() ใน CSS ใช้เพื่อกำหนดเมทริกซ์การแปลง 3 มิติที่เป็นเนื้อเดียวกัน 4x4

ตัวอย่าง

<!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>

ผลลัพธ์

ฟังก์ชัน CSS3 matrix3d()

ตัวอย่าง

เรามาดูตัวอย่างกัน −

<!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>

ผลลัพธ์

ฟังก์ชัน CSS3 matrix3d()