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

mask-positionCSS プロパティで、定義されたマスク画像それぞれについて、 {{cssxref("mask-origin")}} で設定されたマスク位置レイヤーからの相対で初期位置を設定します。

+ +
/* キーワード値 */
+mask-position: top;
+mask-position: bottom;
+mask-position: left;
+mask-position: right;
+mask-position: center;
+
+/* <position> 値 */
+mask-position: 25% 75%;
+mask-position: 0px 0px;
+mask-position: 10% 8em;
+
+/* 複数の値 */
+mask-position: top right;
+mask-position: 1rem 1rem, center;
+
+/* グローバル値 */
+mask-position: inherit;
+mask-position: initial;
+mask-position: unset;
+
+ +

{{cssinfo}}

+ +

構文

+ +

1つ以上の <position> 値をコンマで区切ったもの。

+ +

+ +
+
{{cssxref("<position>")}}
+
要素ボックスの辺からの二次元の位置を表す1つから4つの値です。相対または絶対オフセットを与えることができます。なお、位置は要素ボックスの外に設定することができます。
+
+ +

形式文法

+ +
{{csssyntax}}
+ +

+ +

CSS

+ +
#wrapper {
+  border: 1px solid black;
+  width: 250px;
+  height: 250px;
+}
+
+#masked {
+  width: 250px;
+  height: 250px;
+  background: blue linear-gradient(red, blue);
+  mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg);
+  mask-repeat: no-repeat;
+  mask-position: top right; /* Can be changed in the live sample */
+  margin-bottom: 10px;
+}
+
+ + + +

{{EmbedLiveSample("Example", 290, 290)}}

+ +

仕様書

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

ブラウザーの対応

+ + + +

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

-- cgit v1.2.3-54-g00ecf