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/inset/index.html | 115 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 files/ja/web/css/inset/index.html (limited to 'files/ja/web/css/inset') diff --git a/files/ja/web/css/inset/index.html b/files/ja/web/css/inset/index.html new file mode 100644 index 0000000000..26d8ca411c --- /dev/null +++ b/files/ja/web/css/inset/index.html @@ -0,0 +1,115 @@ +--- +title: inset +slug: Web/CSS/inset +tags: + - CSS + - CSS Logical Property + - CSS Property + - Experimental + - Property + - Reference + - 'recipe:css-property' +translation_of: Web/CSS/inset +--- +
{{CSSRef}}
+ +

insetCSS のプロパティで、 {{cssxref("top")}}, {{cssxref("right")}}, {{cssxref("bottom")}}, {{cssxref("left")}} に対応する一括指定です。これは {{cssxref("margin")}} の一括指定における複数値の場合と同じ構文です。

+ +

CSS 論理的プロパティの仕様書で定義されているものですが、論理的なオフセットを定義するものではありません。これは物理的なオフセットであり、要素の書字方向やテキストの向きには関係がありません。

+ +
/* <length> 値 */
+inset: 10px; /* すべての辺に適用される値 */
+inset: 4px 8px; /* 上/下 左/右 */
+inset: 5px 15px 10px; /* 上 左/右 下 */
+inset: 2.4em 3em 3em 3em; /* 上 右 下 左 */
+
+/* 包含ブロックの幅 (左/右) または 高さ (上/下) に対する <percentage> */
+inset: 10% 5% 5% 5%;
+
+/* キーワード値 */
+inset: auto;
+
+/* グローバル値 */
+inset: inherit;
+inset: initial;
+inset: unset;
+
+
+ +

構文

+ +

+ +

inset プロパティは {{cssxref("left")}} プロパティと同じ値を取ります。

+ +

公式定義

+ +

{{cssinfo}}

+ +

形式文法

+ +
{{csssyntax}}
+ +

+ +

要素のオフセットの設定

+ +

HTML

+ +
<div>
+  <span class="exampleText">テキストの例</span>
+</div>
+
+ +

CSS

+ +
div {
+  background-color: yellow;
+  width: 150px;
+  height: 120px;
+  position: relative;
+}
+
+.exampleText {
+  writing-mode: sideways-rl;
+  position: absolute;
+  inset: 20px 40px 30px 10px;
+  background-color: #c8c800;
+}
+ +

結果

+ +

{{EmbedLiveSample("Setting_offsets_for_an_element", 140, 140)}}

+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("CSS Logical Properties", "#propdef-inset", "inset")}}{{Spec2("CSS Logical Properties")}}初回定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("css.properties.inset")}}

+ +

関連情報

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