From 9595be3220981263fcfc3bb7c5e111102ddaae7e Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sun, 10 Oct 2021 12:36:07 +0900 Subject: CSS シェイプの文書を変換準備 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/css/shape-image-threshold/index.html | 131 ---------------------- files/ja/web/css/shape-image-threshold/index.md | 131 ++++++++++++++++++++++ 2 files changed, 131 insertions(+), 131 deletions(-) delete mode 100644 files/ja/web/css/shape-image-threshold/index.html create mode 100644 files/ja/web/css/shape-image-threshold/index.md (limited to 'files/ja/web/css/shape-image-threshold') diff --git a/files/ja/web/css/shape-image-threshold/index.html b/files/ja/web/css/shape-image-threshold/index.html deleted file mode 100644 index 06a839dbed..0000000000 --- a/files/ja/web/css/shape-image-threshold/index.html +++ /dev/null @@ -1,131 +0,0 @@ ---- -title: shape-image-threshold -slug: Web/CSS/shape-image-threshold -tags: - - Boundaries - - CSS - - CSS Property - - CSS Shapes - - Float Area - - Opacity - - Property - - Reference - - Shape - - 'recipe:css-property' - - shape-image-threshold -translation_of: Web/CSS/shape-image-threshold ---- -
{{CSSRef}}
- -

shape-image-thresholdCSS のプロパティで、 {{cssxref("shape-outside")}} の値に指定された画像を使用してシェイプを抽出するのに使用される、アルファチャネルのしきい値を設定します。

- -
{{EmbedInteractiveExample("pages/css/shape-image-threshold.html")}}
- - - -

アルファコンポーネントの値がしきい値よりも大きいピクセルはすべて、境界を特定するためのシェイプの一部とみなされます。例えば、 0.5 の値は不透過度が50%よりも大きいピクセルをすべて含めた図形になるという意味です。

- -

構文

- -
/* <number> 値 */
-shape-image-threshold: 0.7;
-
-/* グローバル値 */
-shape-image-threshold: inherit;
-shape-image-threshold: initial;
-shape-image-threshold: unset;
-
- -

- -
-
{{cssxref("<alpha-value>")}}
-
画像からシェイプを抽出するために使用されるしきい値を設定します。シェイプはアルファ値がしきい値より大きいピクセルによって定義されます。 0.0 (完全に透過) から 1.0 (完全に不透過) の範囲を外れた値は、この範囲に収められます。
-
- -

公式定義

- -

{{cssinfo}}

- -

形式文法

- -{{csssyntax}} - -

- -

グラデーションへのテキストの配置

- -

この例では、グラデーションの背景画像を持つ {{HTMLElement("div")}} ブロックを作成します。グラデーションは shape-outside を使用して CSS シェイプとして確立されているので、グラデーションの中のピクセルのうち 20% よりも大きい不透過度 (つまり、アルファコンポーネントが 0.2 よりも大きいピクセル) はシェイプの一部とみなされます。

- -

HTML

- -
<div id="gradient-shape"></div>
-
-<p>
-  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel at commodi
-  voluptates enim, distinctio officia. Saepe optio accusamus doloribus sint
-  facilis itaque ab nulla, dolor molestiae assumenda cum sit placeat
-  adipisci, libero quae nihil porro debitis laboriosam inventore animi
-  impedit nostrum nesciunt quisquam expedita! Dolores consectetur iure atque
-  a mollitia dicta repudiandae illum exercitationem aliquam repellendus
-  ipsum porro modi, id nemo eligendi, architecto ratione quibusdam iusto
-  nisi soluta? Totam inventore ea eum sed velit et eligendi suscipit
-  accusamus iusto dolore, at provident eius alias maxime pariatur non
-  deleniti ipsum sequi rem eveniet laboriosam magni expedita?
-</p>
- -

CSS

- -
#gradient-shape {
-  width: 150px;
-  height: 150px;
-  float: left;
-  background-image: linear-gradient(30deg, black, transparent 80%,
-      transparent);
-  shape-outside: linear-gradient(30deg, black, transparent 80%,
-      transparent);
-  shape-image-threshold: 0.2;
-}
- -

シェイプは画像ファイルではなく、線形グラデーションの {{cssxref("background-image")}} を使用して定義されています。同じグラデーションが、 {{cssxref("shape-outside")}} プロパティを使用して、浮動領域を設定するためにシェイプが取得される画像としても使用されます。

- -

シェイプの部分として扱うグラデーション内のピクセルは20%の不透過度がしきい値なので、 shape-image-threadhold の値を 0.2 にして使用して作成しています。

- -

結果

- -

{{EmbedLiveSample('Aligning_text_to_a_gradient', 600, 230)}}

- -

仕様書

- - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName('CSS Shapes', '#shape-image-threshold-property', 'shape-image-threshold')}}{{Spec2('CSS Shapes')}}初回定義
- -

ブラウザーの互換性

- -
-

{{Compat("css.properties.shape-image-threshold")}}

-
- -

関連情報

- - diff --git a/files/ja/web/css/shape-image-threshold/index.md b/files/ja/web/css/shape-image-threshold/index.md new file mode 100644 index 0000000000..06a839dbed --- /dev/null +++ b/files/ja/web/css/shape-image-threshold/index.md @@ -0,0 +1,131 @@ +--- +title: shape-image-threshold +slug: Web/CSS/shape-image-threshold +tags: + - Boundaries + - CSS + - CSS Property + - CSS Shapes + - Float Area + - Opacity + - Property + - Reference + - Shape + - 'recipe:css-property' + - shape-image-threshold +translation_of: Web/CSS/shape-image-threshold +--- +
{{CSSRef}}
+ +

shape-image-thresholdCSS のプロパティで、 {{cssxref("shape-outside")}} の値に指定された画像を使用してシェイプを抽出するのに使用される、アルファチャネルのしきい値を設定します。

+ +
{{EmbedInteractiveExample("pages/css/shape-image-threshold.html")}}
+ + + +

アルファコンポーネントの値がしきい値よりも大きいピクセルはすべて、境界を特定するためのシェイプの一部とみなされます。例えば、 0.5 の値は不透過度が50%よりも大きいピクセルをすべて含めた図形になるという意味です。

+ +

構文

+ +
/* <number> 値 */
+shape-image-threshold: 0.7;
+
+/* グローバル値 */
+shape-image-threshold: inherit;
+shape-image-threshold: initial;
+shape-image-threshold: unset;
+
+ +

+ +
+
{{cssxref("<alpha-value>")}}
+
画像からシェイプを抽出するために使用されるしきい値を設定します。シェイプはアルファ値がしきい値より大きいピクセルによって定義されます。 0.0 (完全に透過) から 1.0 (完全に不透過) の範囲を外れた値は、この範囲に収められます。
+
+ +

公式定義

+ +

{{cssinfo}}

+ +

形式文法

+ +{{csssyntax}} + +

+ +

グラデーションへのテキストの配置

+ +

この例では、グラデーションの背景画像を持つ {{HTMLElement("div")}} ブロックを作成します。グラデーションは shape-outside を使用して CSS シェイプとして確立されているので、グラデーションの中のピクセルのうち 20% よりも大きい不透過度 (つまり、アルファコンポーネントが 0.2 よりも大きいピクセル) はシェイプの一部とみなされます。

+ +

HTML

+ +
<div id="gradient-shape"></div>
+
+<p>
+  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel at commodi
+  voluptates enim, distinctio officia. Saepe optio accusamus doloribus sint
+  facilis itaque ab nulla, dolor molestiae assumenda cum sit placeat
+  adipisci, libero quae nihil porro debitis laboriosam inventore animi
+  impedit nostrum nesciunt quisquam expedita! Dolores consectetur iure atque
+  a mollitia dicta repudiandae illum exercitationem aliquam repellendus
+  ipsum porro modi, id nemo eligendi, architecto ratione quibusdam iusto
+  nisi soluta? Totam inventore ea eum sed velit et eligendi suscipit
+  accusamus iusto dolore, at provident eius alias maxime pariatur non
+  deleniti ipsum sequi rem eveniet laboriosam magni expedita?
+</p>
+ +

CSS

+ +
#gradient-shape {
+  width: 150px;
+  height: 150px;
+  float: left;
+  background-image: linear-gradient(30deg, black, transparent 80%,
+      transparent);
+  shape-outside: linear-gradient(30deg, black, transparent 80%,
+      transparent);
+  shape-image-threshold: 0.2;
+}
+ +

シェイプは画像ファイルではなく、線形グラデーションの {{cssxref("background-image")}} を使用して定義されています。同じグラデーションが、 {{cssxref("shape-outside")}} プロパティを使用して、浮動領域を設定するためにシェイプが取得される画像としても使用されます。

+ +

シェイプの部分として扱うグラデーション内のピクセルは20%の不透過度がしきい値なので、 shape-image-threadhold の値を 0.2 にして使用して作成しています。

+ +

結果

+ +

{{EmbedLiveSample('Aligning_text_to_a_gradient', 600, 230)}}

+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSS Shapes', '#shape-image-threshold-property', 'shape-image-threshold')}}{{Spec2('CSS Shapes')}}初回定義
+ +

ブラウザーの互換性

+ +
+

{{Compat("css.properties.shape-image-threshold")}}

+
+ +

関連情報

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