From 9bf6693b2edd5281c1577856895c55653a41dc01 Mon Sep 17 00:00:00 2001 From: MDN Date: Sat, 19 Mar 2022 00:13:08 +0000 Subject: [CRON] sync translated content --- .../web/css/transform-function/rotate()/index.html | 90 ---------------------- 1 file changed, 90 deletions(-) delete mode 100644 files/zh-cn/web/css/transform-function/rotate()/index.html (limited to 'files/zh-cn/web/css/transform-function/rotate()') diff --git a/files/zh-cn/web/css/transform-function/rotate()/index.html b/files/zh-cn/web/css/transform-function/rotate()/index.html deleted file mode 100644 index e7e5807e55..0000000000 --- a/files/zh-cn/web/css/transform-function/rotate()/index.html +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: rotate() -slug: Web/CSS/transform-function/rotate() -tags: - - CSS - - CSS函数 - - CSS变换 -translation_of: Web/CSS/transform-function/rotate() ---- -
{{CSSRef}}
- -
CSS的rotate()函数定义了一种将元素围绕一个定点(由{{ Cssxref("transform-origin") }}属性指定)旋转而不变形的转换。指定的角度定义了旋转的量度。若角度为正,则顺时针方向旋转,否则逆时针方向旋转。旋转180°也被称为点反射。
- - - -

元素旋转的固定点 - 如上所述 - 也称为变换原点。这默认为元素的中心,但你可以使用{{ cssxref("transform-origin") }}属性设置自己的自定义变换原点。

- -

语法

- -

{{cssxref("<angle>")}} 指定了 rotate() 的旋转程度。参数为正时,顺时针旋转;参数为负时,逆时针旋转。180° 旋转称为点反演

- -
rotate(a)
-
- -

- -
-
a
-
是一种{{ cssxref("<angle>") }},表示旋转的角度。 正角度表示了顺时针的旋转,负角度表示逆时针的旋转。
-
- - - - - - - - - - - - - - - - - - - - - -
-

笛卡尔坐标系 on ℝ2

-
齐次坐标系 on ℝℙ2笛卡尔坐标系 on ℝ3齐次坐标系 on ℝℙ3
cos(a)-sin(a) sin(a)cos(a) cos(a)-sin(a)0sin(a)cos(a)0001 cos(a)-sin(a)0sin(a)cos(a)0001 cos(a)-sin(a)00sin(a)cos(a)0000100001
[cos(a) sin(a) -sin(a) cos(a) 0 0]
- -

示例

- -

HTML

- -
<div>Normal</div>
-<div class="rotated">Rotated</div>
- -

CSS

- -
div {
-  width: 80px;
-  height: 80px;
-  background-color: skyblue;
-}
-
-.rotated {
-  transform: rotate(45deg); /* Equal to rotateZ(45deg) */
-  background-color: pink;
-}
- -

结果

- -

{{EmbedLiveSample("示例","100%","200")}}

- -

浏览器兼容

- -

有关兼容性信息,请参阅<transform-function>数据类型。

- -

参见

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