From c98a9b1cf02d9143cc6924f1991d600c0f807411 Mon Sep 17 00:00:00 2001 From: MDN Date: Wed, 30 Jun 2021 00:38:38 +0000 Subject: [CRON] sync translated content --- .../css/transform-function/translatex/index.html | 129 --------------------- 1 file changed, 129 deletions(-) delete mode 100644 files/zh-cn/web/css/transform-function/translatex/index.html (limited to 'files/zh-cn/web/css') diff --git a/files/zh-cn/web/css/transform-function/translatex/index.html b/files/zh-cn/web/css/transform-function/translatex/index.html deleted file mode 100644 index 16047b2fc6..0000000000 --- a/files/zh-cn/web/css/transform-function/translatex/index.html +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: translateX() -slug: Web/CSS/transform-function/translateX -tags: - - CSS函数 - - CSS变形属性 - - 参考 -translation_of: Web/CSS/transform-function/translateX ---- -
{{CSSRef}}
- -

translateX()函数表示在二维平面上水平方向移动元素。 其结果的数据类型是{{cssxref("<transform-function>")}}。

- -

- -
-

注意: translateX(tx)等同于 translate(tx, 0) 或者 translate3d(tx, 0, 0)。

-
- -

语法

- -
translateX(t)
-
- -

参数

- -
-
t
-
     代表了向量平移的横坐标长度{{cssxref("<length>")}}。
-
- - - - - - - - - - - - - - - - - - - - - -
2空间中的笛卡尔坐标在ℝℙ2上的投影坐标在ℝ3上的笛卡尔坐标在ℝℙ3上的投影坐标
-

在ℝ空间中的平移并非线性变化,因此不能表示为笛卡尔坐标矩阵。

-
-

t

- -

0

- -

1

-
-

t

- -

0

- -

1

-
-

t

- -

0

- -

0

- -

1

-
[1 0 0 1 t 0]
- -

示例

- -

HTML

- -
<div>Static</div>
-<div class="moved">Moved</div>
-<div>Static</div>
- -

CSS

- -
div {
-  width: 60px;
-  height: 60px;
-  background-color: skyblue;
-}
-
-.moved {
-  transform: translateX(10px); /* 等同于 translate(10px) */
-  background-color: pink;
-}
- -

结果

- -

{{EmbedLiveSample("Examples", 250, 250)}}

- -

标准化说明

- - - - - - - - - - - - - - - - -
标准状态备注
{{SpecName("CSS3 Transforms", "#funcdef-transform-translatex", "translateX()")}}{{Spec2("CSS3 Transforms")}}原始定义
- -

浏览器兼容性

- -

请前往数据类型{{cssxref("transform-function")}}的页面以查看兼容性信息。

- -

参阅

- - -- cgit v1.2.3-54-g00ecf