aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/css/mask-mode/index.md
diff options
context:
space:
mode:
authorMasahiro FUJIMOTO <mfujimot@gmail.com>2021-11-09 23:48:02 +0900
committerMasahiro FUJIMOTO <mfujimot@gmail.com>2021-11-20 22:35:37 +0900
commit684f3a1f7c141b4d1c522687062ff0e6e2e1a080 (patch)
tree3798639490bef357508feadef36e1bee7860cf3e /files/ja/web/css/mask-mode/index.md
parent0fade6a001e0275bd20326c6ac6e04a759bb8cd0 (diff)
downloadtranslated-content-684f3a1f7c141b4d1c522687062ff0e6e2e1a080.tar.gz
translated-content-684f3a1f7c141b4d1c522687062ff0e6e2e1a080.tar.bz2
translated-content-684f3a1f7c141b4d1c522687062ff0e6e2e1a080.zip
CSS Masking のプロパティの文書を変換準備
Diffstat (limited to 'files/ja/web/css/mask-mode/index.md')
-rw-r--r--files/ja/web/css/mask-mode/index.md119
1 files changed, 119 insertions, 0 deletions
diff --git a/files/ja/web/css/mask-mode/index.md b/files/ja/web/css/mask-mode/index.md
new file mode 100644
index 0000000000..a4f99606b2
--- /dev/null
+++ b/files/ja/web/css/mask-mode/index.md
@@ -0,0 +1,119 @@
+---
+title: mask-mode
+slug: Web/CSS/mask-mode
+tags:
+ - CSS
+ - CSS Masking
+ - CSS Property
+ - Experimental
+ - Reference
+ - 'recipe:css-property'
+translation_of: Web/CSS/mask-mode
+---
+<div>{{CSSRef}}</div>
+
+<p><a href="/ja/docs/Web/CSS">CSS</a> の <strong><code>mask-mode</code></strong> プロパティは、 {{cssxref("mask-image")}} で定義されたマスクを、明度とアルファマスクのどちらで扱うかを設定します。</p>
+
+<pre class="brush:css no-line-numbers notranslate">/* キーワード値 */
+mask-mode: alpha;
+mask-mode: luminance;
+mask-mode: match-source;
+
+/* 複数の値 */
+mask-mode: alpha, match-source;
+
+/* グローバル値 */
+mask-mode: inherit;
+mask-mode: initial;
+mask-mode: unset;
+</pre>
+
+<h2 id="Syntax" name="Syntax">構文</h2>
+
+<p><code>mask-mode</code> プロパティは、以下に示す1つ又は複数のキーワード値を、カンマで区切って指定します。</p>
+
+<h3 id="Values" name="Values">値</h3>
+
+<dl>
+ <dt><code>alpha</code></dt>
+ <dd>このキーワードは、マスクレイヤーの透過性 (アルファチャンネル) の値をマスクの値として使用することを示します。</dd>
+ <dt><code>luminance</code></dt>
+ <dd>このキーワードは、マスクレイヤーの明度の値をマスクの値として使用することを示します。</dd>
+ <dt><code>match-source</code></dt>
+ <dd>
+ <p>{{cssxref("mask-image")}} プロパティが <code>&lt;mask-source&gt;</code> 型であれば、マスクレイヤー画像の明度の値がマスクの値として使用されます。</p>
+
+ <p>{{cssxref("&lt;image&gt;")}} 型であれば、マスクレイヤー画像のアルファ値がマスクの値として使用されます。</p>
+ </dd>
+</dl>
+
+<h2 id="Formal_definition" name="Formal_definition">公式定義</h2>
+
+<p>{{cssinfo}}</p>
+
+<h2 id="Formal_syntax" name="Formal_syntax">形式文法</h2>
+
+{{csssyntax}}
+
+<h2 id="Examples" name="Examples">例</h2>
+
+<h3 id="Using_alpha_mask_mode" name="Using_alpha_mask_mode">アルファマスクモードの使用</h3>
+
+<h4 id="CSS">CSS</h4>
+
+<pre class="brush: css; highlight[6] notranslate">#masked {
+ width: 227px;
+ height: 200px;
+ background: blue linear-gradient(red, blue);
+ mask-image: url(https://mdn.mozillademos.org/files/12668/MDN.svg);
+ mask-mode: alpha; /* ライブサンプルで変更することができます */
+}
+</pre>
+
+<div class="hidden">
+<h4 id="HTML">HTML</h4>
+
+<pre class="brush: html notranslate">&lt;div id="masked"&gt;
+&lt;/div&gt;
+&lt;select id="maskMode"&gt;
+ &lt;option value="alpha"&gt;alpha&lt;/option&gt;
+ &lt;option value="luminance"&gt;luminance&lt;/option&gt;
+ &lt;option value="match-source"&gt;match-source&lt;/option&gt;
+&lt;/select&gt;
+</pre>
+
+<h4 id="JavaScript">JavaScript</h4>
+
+<pre class="brush: js notranslate">var maskMode = document.getElementById("maskMode");
+maskMode.addEventListener("change", function (evt) {
+ document.getElementById("masked").style.maskMode = evt.target.value;
+});
+</pre>
+</div>
+
+<h3 id="Result" name="Result">結果</h3>
+
+<p>{{EmbedLiveSample("Using_alpha_mask_mode", 240, 240)}}</p>
+
+<h2 id="Specifications" name="Specifications">仕様書</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">仕様書</th>
+ <th scope="col">状態</th>
+ <th scope="col">備考</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName("CSS Masks", "#the-mask-mode", "mask-mode")}}</td>
+ <td>{{Spec2("CSS Masks")}}</td>
+ <td>初回定義</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>
+
+<p>{{Compat("css.properties.mask-mode")}}</p>