aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/css/transform-function/rotatey/index.md
diff options
context:
space:
mode:
Diffstat (limited to 'files/ja/web/css/transform-function/rotatey/index.md')
-rw-r--r--files/ja/web/css/transform-function/rotatey/index.md177
1 files changed, 177 insertions, 0 deletions
diff --git a/files/ja/web/css/transform-function/rotatey/index.md b/files/ja/web/css/transform-function/rotatey/index.md
new file mode 100644
index 0000000000..a039fe60a4
--- /dev/null
+++ b/files/ja/web/css/transform-function/rotatey/index.md
@@ -0,0 +1,177 @@
+---
+title: rotateY()
+slug: Web/CSS/transform-function/rotateY
+tags:
+ - CSS
+ - CSS 関数
+ - CSS 座標変換
+ - 関数
+ - リファレンス
+translation_of: Web/CSS/transform-function/rotateY()
+original_slug: Web/CSS/transform-function/rotateY()
+browser-compat: css.types.transform-function.rotateY
+---
+{{CSSRef}}
+
+**`rotateY()`** は [CSS](/ja/docs/Web/CSS) の[関数](/ja/docs/Web/CSS/CSS_Functions)で、要素の形を変化させずに縦座標 (垂直軸) の周りを回転させる変形を定義します。結果は {{cssxref("<transform-function>")}} データ型になります。
+
+{{EmbedInteractiveExample("pages/css/function-rotateY.html")}}
+
+回転軸は、 {{ cssxref("transform-origin") }} CSS プロパティで定義される原点を通ります。
+
+> **Note:** `rotateY(a)` は `rotate3d(0, 1, 0, a)` と等価です。
+
+> **Note:** 二次元平面での回転とは異なり、三次元での回転はふつう交換可能ではありません。言い換えれば、回転の順番が結果に影響を与えます。
+
+## 構文
+
+`rotateY()` で生成される回転の量は、 {{cssxref("<angle>")}} で指定します。正の数であれば、移動は時計回りです。負の数であれば、反時計回りになります。
+
+```css
+rotateY(a)
+```
+
+### 値
+
+- `a`
+ - : {{ cssxref("<angle>") }} で、回転する角度を表します。正の数の角度は時計回りの回転を、負の数の角度は反時計回りの回転を表します。
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">ℝ^2 のデカルト座標</th>
+ <th scope="col">ℝℙ^2 の同次座標</th>
+ <th scope="col">ℝ^3 のデカルト座標</th>
+ <th scope="col">ℝℙ^3 の同次座標</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td colspan="2">
+ この変形は三次元空間に適用され、平面で表すことはできません。
+ </td>
+ <td>
+ <math
+ ><mfenced
+ ><mtable
+ ><mtr
+ ><mtd
+ ><mo>cos</mo>
+ <mo>(</mo>
+ <mi>a</mi>
+ <mo>)</mo> </mtd
+ ><mtd><mn>0</mn> </mtd
+ ><mtd
+ ><mo>sin</mo>
+ <mo>(</mo>
+ <mi>a</mi>
+ <mo>)</mo>
+ </mtd></mtr
+ ><mtr
+ ><mtd><mn>0</mn> </mtd><mtd><mn>1</mn> </mtd
+ ><mtd><mn>0</mn> </mtd></mtr
+ ><mtr
+ ><mtd
+ ><mo>-</mo>
+ <mo>sin</mo>
+ <mo>(</mo>
+ <mi>a</mi>
+ <mo>)</mo> </mtd
+ ><mtd><mn>0</mn> </mtd
+ ><mtd
+ ><mo>cos</mo>
+ <mo>(</mo>
+ <mi>a</mi>
+ <mo>)</mo></mtd
+ ></mtr
+ ></mtable
+ ></mfenced
+ ></math
+ >
+ </td>
+ <td>
+ <math
+ ><mfenced
+ ><mtable
+ ><mtr
+ ><mtd
+ ><mo>cos</mo>
+ <mo>(</mo>
+ <mi>a</mi>
+ <mo>)</mo> </mtd
+ ><mtd><mn>0</mn> </mtd
+ ><mtd
+ ><mo>sin</mo>
+ <mo>(</mo>
+ <mi>a</mi>
+ <mo>)</mo> </mtd
+ ><mtd><mn>0</mn> </mtd></mtr
+ ><mtr
+ ><mtd><mn>0</mn> </mtd><mtd><mn>1</mn> </mtd
+ ><mtd><mn>0</mn> </mtd><mtd><mn>0</mn> </mtd></mtr
+ ><mtr
+ ><mtd
+ ><mo>-</mo>
+ <mo>sin</mo>
+ <mo>(</mo>
+ <mi>a</mi>
+ <mo>)</mo> </mtd
+ ><mtd><mn>0</mn> </mtd
+ ><mtd
+ ><mo>cos</mo>
+ <mo>(</mo>
+ <mi>a</mi>
+ <mo>)</mo> </mtd
+ ><mtd><mn>0</mn> </mtd></mtr
+ ><mtr
+ ><mtd><mn>0</mn> </mtd><mtd><mn>0</mn> </mtd
+ ><mtd><mn>0</mn> </mtd><mtd><mn>1</mn></mtd></mtr
+ ></mtable
+ ></mfenced
+ ></math
+ >
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Examples">例</h2>
+
+### HTML
+
+```html
+<div>Normal</div>
+<div class="rotated">Rotated</div>
+```
+
+### CSS
+
+```css
+div {
+ width: 80px;
+ height: 80px;
+ background-color: skyblue;
+}
+
+.rotated {
+ transform: rotateY(60deg);
+ background-color: pink;
+}
+```
+
+### 結果
+
+{{EmbedLiveSample("Examples", "auto", 180)}}
+
+## 仕様書
+
+{{Specifications}}
+
+## ブラウザーの互換性
+
+{{Compat}}
+
+## 関連情報
+
+- {{cssxref("transform")}}
+- {{cssxref("&lt;transform-function&gt;")}}