From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/css/scale/index.html | 134 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 files/ja/web/css/scale/index.html (limited to 'files/ja/web/css/scale/index.html') diff --git a/files/ja/web/css/scale/index.html b/files/ja/web/css/scale/index.html new file mode 100644 index 0000000000..7385f5cd6a --- /dev/null +++ b/files/ja/web/css/scale/index.html @@ -0,0 +1,134 @@ +--- +title: scale +slug: Web/CSS/scale +tags: + - CSS + - CSS Property + - Reference + - Transforms + - 'recipe:css-property' +translation_of: Web/CSS/scale +--- +
{{CSSRef}}
+ +

scaleCSS のプロパティで、 {{CSSxRef("transform")}} とは個別に独立して倍率変換を指定することができます。これは一般のユーザーインターフェイスの利用においてはより適しており、 transform の値で変換関数を指定する実際の順序を思い出す手間を軽減します。

+ +

構文

+ +
/* キーワード値 */
+scale: none;
+
+/* 1つの値 */
+/* 1より大きい値で要素を拡大 */
+scale: 2;
+/* 1より小さい値で要素を縮小 */
+scale: 0.5;
+
+/* 2つの値 */
+scale: 2 0.5;
+
+/* 3つの値 */
+scale: 2 0.5 2;
+ +

+ +
+
1つの数値
+
該当する要素の拡大率を指定する {{CSSxRef("<number>")}} であり、 X 及び Y 軸で同じ倍率になります。 scale() (2D 倍率) 関数に1つの値を指定した場合と等価です。
+
2つの長さ/パーセント値
+
2つの {{CSSxRef("<number>")}} 値で、 2D 倍率における X 軸と Y 軸の拡大率を (それぞれ) 指定します。 scale() (2D 倍率) 関数に2つの値を指定した場合と等価です。
+
3つの長さ/パーセント値
+
3つの {{CSSxRef("<number>")}} 値で、 3D 倍率における X 軸と Y 軸と Z 軸の拡大率を (それぞれ) 指定します。 translate3d() (3D 倍率) 関数と等価です。
+
none
+
拡大率が適用されないことを示します。
+
+ +

公式定義

+ +

{{cssinfo}}

+ +

形式文法

+ +
{{csssyntax}}
+ +

+ +

上に乗った際の要素の拡大Scaling an element on hover

+ +

HTML

+ +
<div>
+  <p class="scale">Scaling</p>
+</div>
+ +

CSS

+ +
* {
+  box-sizing: border-box;
+}
+
+html {
+  font-family: sans-serif;
+}
+
+div {
+  width: 150px;
+  margin: 0 auto;
+}
+
+p {
+  padding: 10px 5px;
+  border: 3px solid black;
+  border-radius: 20px;
+  width: 150px;
+  font-size: 1.2rem;
+  text-align: center;
+}
+
+.scale {
+  transition: scale 1s;
+}
+
+div:hover .scale {
+  scale: 2 0.7;
+}
+
+ +

結果

+ +

{{EmbedLiveSample("Scaling_an_element_on_hover")}}

+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("CSS Transforms 2", "#individual-transforms", "individual transforms")}}{{Spec2("CSS Transforms 2")}}初回定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("css.properties.scale")}}

+ +

関連情報

+ + + +

注: skew は独立した変形値ではありません

-- cgit v1.2.3-54-g00ecf