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/mask-image/index.html | 96 ++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 files/ja/web/css/mask-image/index.html (limited to 'files/ja/web/css/mask-image/index.html') diff --git a/files/ja/web/css/mask-image/index.html b/files/ja/web/css/mask-image/index.html new file mode 100644 index 0000000000..1ef8500d4c --- /dev/null +++ b/files/ja/web/css/mask-image/index.html @@ -0,0 +1,96 @@ +--- +title: mask-image +slug: Web/CSS/mask-image +tags: + - CSS + - CSS プロパティ + - CSS マスク + - Experimental + - Reference +translation_of: Web/CSS/mask-image +--- +
{{CSSRef}}
+ +

mask-imageCSS のプロパティで、要素のマスクレイヤーとして使用される画像を設定します。

+ +
/* キーワード値 */
+mask-image: none;
+
+/* <mask-source> 値 */
+mask-image: url(masks.svg#mask1);
+
+/* <image> 値 */
+mask-image: linear-gradient(rgba(0, 0, 0, 1.0), transparent);
+mask-image: image(url(mask.png), skyblue);
+
+/* 複数の値 */
+mask-image: image(url(mask.png), skyblue), linear-gradient(rgba(0, 0, 0, 1.0), transparent);
+
+/* グローバル値 */
+mask-image: inherit;
+mask-image: initial;
+mask-image: unset;
+
+ +

{{cssinfo}}

+ +

構文

+ +

+ +
+
none
+
このキーワードは、透明な黒い画像レイヤーとして解釈されます。
+
<mask-source>
+
{{cssxref("<url>")}} による {{SVGElement("mask")}} または CSS 画像への参照です。
+
{{cssxref("<image>")}}
+
マスク画像レイヤーとして使用有れる画像の値です。
+
+ +

形式文法

+ +
{{csssyntax}}
+ +

+ +

CSS

+ +
#masked {
+  width: 100px;
+  height: 100px;
+  background-color: #8cffa0;
+  -webkit-mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg);
+  mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg);
+}
+ +

HTML

+ +
<div id="masked"></div>
+
+ +

{{EmbedLiveSample('Example', '100px', '100px', '', '', 'hide-codepen-jsfiddle')}}

+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("CSS Masks", "#the-mask-image", "mask-image")}}{{Spec2("CSS Masks")}}初回定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("css.properties.mask-image")}}

-- cgit v1.2.3-54-g00ecf