From a81cea7d8b08d1765dcc5ea62e6238dd1d596a05 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Tue, 23 Nov 2021 02:21:04 +0900 Subject: CSS 座標変換関数のリファレンスを更新 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 2021/11/21 時点の英語版に同期 --- .../web/css/transform-function/scalex()/index.md | 204 +++++++++++++-------- 1 file changed, 126 insertions(+), 78 deletions(-) (limited to 'files/ja/web/css/transform-function/scalex()') diff --git a/files/ja/web/css/transform-function/scalex()/index.md b/files/ja/web/css/transform-function/scalex()/index.md index 8548b169c4..231094820a 100644 --- a/files/ja/web/css/transform-function/scalex()/index.md +++ b/files/ja/web/css/transform-function/scalex()/index.md @@ -1,70 +1,137 @@ --- title: scaleX() slug: Web/CSS/transform-function/scaleX() +tags: + - CSS + - CSS 関数 + - CSS 座標変換 + - 関数 + - リファレンス +browser-compat: css.types.transform-function.scaleX translation_of: Web/CSS/transform-function/scaleX() --- -
{{CSSRef}}
+{{CSSRef}} -
CSSscaleX() 関数は、要素をX軸に沿って(水平に)拡縮する変形を定義します。
+**`scaleX()`** は [CSS](/ja/docs/Web/CSS) の[関数](/ja/docs/Web/CSS/CSS_Functions)で、要素を X 軸に沿って (水平に) 変倍する変形を定義します。結果は {{cssxref("<transform-function>")}} データ型になります。 -
結果は <transform-function> データ型になります。
+![](scalex.png) -
+これは要素のそれぞれの点の横座標を一定の係数で修正しますが、係数が 1 である場合はこの関数が恒等変換になるので例外です。変倍は等方性ではなく、要素の角度は保存されません。 `scaleX(-1)` は[軸の線対称](https://en.wikipedia.org/wiki/Axial_symmetry)を定義し、垂直軸は ({{cssxref("transform-origin")}} プロパティの指定通りに) 原点を通過します。 -
+> **Note:** `scaleX(sx)` は `scale(sx, 1)` または `scale3d(sx, 1, 1)` と等価です。 -

+## 構文 -

係数が 1 である場合を除いて、各要素点の横座標を一定の係数で修正し、この場合、関数は恒等変換です。拡大縮小は等方性ではなく、要素の角度は保存されません。 scaleX(-1) は軸の線対称を定義し、垂直軸は原点を通過します (transform-origin プロパティで指定)。

+```css +scaleX(s) +``` -
-

メモ: scaleX(sx) scale(sx, 1)またはscale3d(sx, 1, 1)と等価です。

-
+### 値 -

Syntax

- -
scaleX(s)
-
- -

Values

- -
-
s
-
Is a {{cssxref("<number>")}} representing the scaling factor to apply on the abscissa of each point of the element.
-
+- `s` + - : {{cssxref("<number>")}} で、要素のそれぞれの点の横座標に適用される変倍率を表します。 - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + +
Cartesian coordinates on ℝ2Homogeneous coordinates on ℝℙ2Cartesian coordinates on ℝ3Homogeneous coordinates on ℝℙ3
s0 01 s00010001 s00010001 s000010000100001
[s 0 0 1 0 0]
ℝ^2 上のデカルト座標ℝℙ^2 上の同次座標ℝ^3 上のデカルト座標ℝℙ^3 上の同次座標
+ s 0 0 1 + + s 0 0 0 1 0 0 0 1 + + s 0 0 0 1 0 0 0 1 + + s 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 +
[s 0 0 1 0 0]
-

Examples

+

-

HTML

+### HTML -
<div>Normal</div>
-<div class="scaled">Scaled</div>
+```html +
Normal
+
Scaled
+``` -

CSS

+### CSS -
div {
+```css
+div {
   width: 80px;
   height: 80px;
   background-color: skyblue;
@@ -74,43 +141,24 @@ translation_of: Web/CSS/transform-function/scaleX()
   transform: scaleX(0.6);
   background-color: pink;
 }
-
- -

Result

+``` -

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

+### 結果 -

Specifications

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName("CSS3 Transforms", "#funcdef-transform-scalex", "scaleX()")}}{{Spec2("CSS3 Transforms")}}Initial definition
+{{EmbedLiveSample("Examples","200","200")}} -

Browser compatibility

+## 仕様書 +{{Specifications}} +## ブラウザーの互換性 -

{{Compat("css.types.transform-function")}}

+{{Compat}} -

See also

+## 関連情報 - +- [`scaleY()`]() +- [`scaleZ()`]() +- {{cssxref("transform")}} +- {{cssxref("<transform-function>")}} +- {{cssxref("transform-origin")}} -- cgit v1.2.3-54-g00ecf