From e160f04ecb5945c3dcf028e9d836be665dbf0ddc Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sat, 20 Nov 2021 23:56:35 +0900 Subject: CSS Values and Units のプロパティを変換準備 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/css/integer/index.md | 93 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 files/ja/web/css/integer/index.md (limited to 'files/ja/web/css/integer/index.md') diff --git a/files/ja/web/css/integer/index.md b/files/ja/web/css/integer/index.md new file mode 100644 index 0000000000..2d4976e00e --- /dev/null +++ b/files/ja/web/css/integer/index.md @@ -0,0 +1,93 @@ +--- +title: +slug: Web/CSS/integer +tags: + - CSS + - CSS データ型 + - Reference + - Web +translation_of: Web/CSS/integer +--- +
{{CSSRef}}
+ +

<integer>CSSデータ型で、 {{cssxref("number")}} の特殊型であり、正と負の整数を表現します。 integer は {{cssxref("column-count")}}, {{cssxref("counter-increment")}}, {{cssxref("grid-column")}}, {{cssxref("grid-row")}}, {{cssxref("z-index")}} など、数多くの CSS プロパティで使用することができます。

+ +

構文

+ +

<integer> データ型は数桁の10進数、 0 から 9 までを含み、任意でその前に単一の + または - の符号が付きます。 integer に関連付けられた単位はありません。

+ +
公式には、有効な <integer> 値の範囲は決められていません。 Opera では 215-1、 IE では220-1 まで、その他のブラウザーではそれ以上の値に対応しています。 CSS3 Values の策定中には対応すべき最小範囲について多くの議論がありました。 LC 段階の 2012 年 4 月の最新の決定では、 [-227-1; 227-1] でしたが、# しかし 224-1 や 230-1 のような他の値も提案されていました。しかし、最新の仕様書では範囲を定めなくなりました。
+ +

補間

+ +

アニメーション時には、 <integer> データ型の値は離散的に整数を使用して補間されます。実数、すなわち浮動小数点で計算が行われた場合、離散値は floor 関数を使って求められます。補間の速度は、アニメーションに結びつけられた timing function で決められます。

+ +

+ +

妥当な integer の値

+ +
12          正の整数 (先頭の + なし)
++123        正の整数 (先頭の + あり)
+-456        負の整数
+0           ゼロ
++0          ゼロ、先頭の + つき
+-0          ゼロ、先頭の - なし
+
+ +

不正な integer の値

+ +
12.0        整数を表していますが、これは <number> であり、<integer> ではありません。
+12.         小数点を含んではいけません。
++---12      先頭に置ける +/- は 1 つだけです。
+ten         文字は使えません。
+_5          記号は使えません。
+\35         エスケープを使った Unicode 文字は、それが整数を表す場合でも (これは 5 です) 使えません。
+\4E94       アラビア数字以外の数字は使えません (これは日本語の「五」です)。
+3e4         指数表記は使えません。
+
+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSS4 Values', '#integers', '<integer>')}}{{Spec2('CSS4 Values')}}重要な変更はなし。
{{SpecName('CSS3 Values', '#integers', '<integer>')}}{{Spec2('CSS3 Values')}}重要な変更はなし。
{{SpecName('CSS2.1', 'syndata.html#numbers', '<integer>')}}{{Spec2('CSS2.1')}}明示的な定義
{{SpecName('CSS1', '', '<integer>')}}{{Spec2('CSS1')}}暗黙的な定義
+ +

ブラウザーの互換性

+ +
+

{{Compat("css.types.integer")}}

+
+ +

関連情報

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