CSS3 matrix3d() 函数

cssweb developmentfront end technology更新于 2024/11/5 6:36:17

CSS 中的 matrix3d() 函数用于定义 4x4 齐次 3D 变换矩阵。

示例

<!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.cainiaomax.com/machine_learning/images/machine-learning-mini-logo.jpg" alt="Apache Spark">
</body>
</html>

输出

示例

让我们看另一个例子 −

<!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.cainiaomax.com/machine_learning/images/machine-learning-mini-logo.jpg" alt="Apache Spark">
</body>
</html>

输出


相关文章


有用资源