使用 CSS3 使用 x 轴、y 轴和 z 轴变换元素
cssweb developmentfront end technology更新于 2024/3/24 6:36:17
使用 transform3d(x,y,z) 方法使用 x 轴、y 轴和 z 轴变换元素。
查看语法
translate3d(tx, ty, tz)
tx:表示平移向量横坐标的 <length> 值。
ty:表示平移向量纵坐标的 <length> 值。
tz:表示平移向量 z 轴分量的 <length> 值。
查看示例
div {
width: 50px;
height: 50px;
background-color: orange;
}
.trans {
transform: perspective(300px) translate3d(15px, 0, 0px);
background-color: black;
}
相关文章
有用资源
css 参考教程 - 该教程包含有关 css 的更多信息:https://www.cainiaomax.com/css/

