使用 CSS3 使用 y 轴变换元素
cssweb developmentfront end technology更新于 2024/3/24 11:24:17
使用 transformY(y) 方法使用 y 轴变换元素。
让我们看看语法 −
translateY(y)
这里,
- y:表示平移向量纵坐标的长度。
让我们看一个例子:
div {
width: 40px;
height: 40px;
background-color: black;
}
.trans {
transform: translateY(20px);
background-color: orange;
}
相关文章
有用资源
css 参考教程 - 该教程包含有关 css 的更多信息:https://www.cainiaomax.com/css/

