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/border-image-slice/index.html | 115 +++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 files/ja/web/css/border-image-slice/index.html (limited to 'files/ja/web/css/border-image-slice') diff --git a/files/ja/web/css/border-image-slice/index.html b/files/ja/web/css/border-image-slice/index.html new file mode 100644 index 0000000000..98e350758f --- /dev/null +++ b/files/ja/web/css/border-image-slice/index.html @@ -0,0 +1,115 @@ +--- +title: border-image-slice +slug: Web/CSS/border-image-slice +tags: + - CSS + - CSS プロパティ + - CSS 背景と境界 + - border-image + - border-image-slice + - リファレンス +translation_of: Web/CSS/border-image-slice +--- +
{{CSSRef}}
+ +

CSSborder-image-slice プロパティは {{cssxref("border-image-source")}} で指定された画像を複数の領域に分割します。これらの領域は境界画像の部品を構成します。

+ +
{{EmbedInteractiveExample("pages/css/border-image-slice.html")}}
+ + + +

分割する過程で、4つの角、4つの辺、それに中央領域の計9つの領域を作成します。それぞれの辺からの距離で設定される4本の分割線が、領域の寸法を制御します。

+ +

The nine regions defined by the border-image or border-image-slice properties

+ +

上の図は、それぞれの領域の位置を説明しています。

+ + + +

{{cssxref("border-image-repeat")}}, {{cssxref("border-image-width")}}, {{cssxref("border-image-outset")}} の各プロパティは、最終的な境界画像を構成するためにこれらの領域が使用される方法を指定します。

+ +

構文

+ +
/* すべての辺 */
+border-image-slice: 30%;
+
+/* 上下 | 左右 */
+border-image-slice: 10% 30%;
+
+/* 上 | 左右 | 下 */
+border-image-slice: 30 30% 45;
+
+/* 上 | 右 | 下 | 左 */
+border-image-slice: 7 12 14 5;
+
+/* `fill` キーワードの使用 */
+border-image-slice: 10% fill 7 12;
+
+/* グローバル値 */
+border-image-slice: inherit;
+border-image-slice: initial;
+border-image-slice: unset;
+
+ +

border-image-slice プロパティは1つから4つの <number-percentage> 値を使用して指定することができます。負の値は無効です。実際の寸法よりも大きい値は 100% に丸められます。

+ + + +

fill の値は任意で、使用する場合は、宣言のどこにおいても構いません。

+ +

+ +
+
{{cssxref("<number>")}}
+
縁からのオフセットを、ラスター画像の場合はピクセル数で、ベクター画像の場合は座標で表します。ベクター画像の場合、数値は元の画像の寸法ではなく、要素の寸法に対する相対値になるので、この場合は一般にパーセント値の方が適しています。
+
{{cssxref("<percentage>")}}
+
縁からのオフセットを、元の画像の寸法、つまり水平方向のオフセットであれば画像の幅、垂直方向のオフセットであれば画像の高さに対するパーセント値で表します。
+
fill
+
中央の画像領域を維持し、背景画像のように表示しますが、実際の {{cssxref("background")}} の上に重ねられます。幅と高さは、画像領域のそれぞれ上と左に一致するように拡縮されます。
+
+ +

形式文法

+ +
{{csssyntax}}
+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSS3 Backgrounds', '#the-border-image-slice', 'border-image-slice')}}{{Spec2('CSS3 Backgrounds')}}初回定義
+ +

{{cssinfo}}

+ +

ブラウザーの対応

+ + + +

{{Compat("css.properties.border-image-slice")}}

+ +

関連情報

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