From 647f2074063d41b629dfab8a38496793512fe635 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Fri, 29 Oct 2021 00:43:43 +0900 Subject: CSS Table 関係の文書の変換準備 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/css/border-spacing/index.html | 129 ----------------------------- files/ja/web/css/border-spacing/index.md | 129 +++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+), 129 deletions(-) delete mode 100644 files/ja/web/css/border-spacing/index.html create mode 100644 files/ja/web/css/border-spacing/index.md (limited to 'files/ja/web/css/border-spacing') diff --git a/files/ja/web/css/border-spacing/index.html b/files/ja/web/css/border-spacing/index.html deleted file mode 100644 index a7eb1e8afe..0000000000 --- a/files/ja/web/css/border-spacing/index.html +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: border-spacing -slug: Web/CSS/border-spacing -tags: - - CSS - - CSS テーブル - - CSS プロパティ - - CSS 表 - - Reference - - リファレンス -translation_of: Web/CSS/border-spacing ---- -
{{CSSRef}}
- -

CSS の border-spacing プロパティは、 {{htmlelement("table")}} における隣り合うセルの枠線同士の間隔を定めます。このプロパティは {{cssxref("border-collapse")}} が separate のときのみ適用されます。

- -
{{EmbedInteractiveExample("pages/css/border-spacing.html")}}
- - - -

border-spacing の値は、表の外周部分にも使用され、表の境界線と最初/最後の列または行との間の距離は、 (縦または横の) 対応する border-spacing と、表の対応する側 (上下左右のいずれか) の {{cssxref("padding")}} の合計になります。

- -
-

メモ: border-spacing プロパティは、 <table> 要素の非推奨になった cellspacing 属性と同等ですが、任意で2つ目の値を指定して、左右方向と上下方向に異なる間隔を設定することができる点が異なります。

-
- -

構文

- -
/* <length> */
-border-spacing: 2px;
-
-/* 左右の <length> | 上下の <length> */
-border-spacing: 1cm 2em;
-
-/* グローバル値 */
-border-spacing: inherit;
-border-spacing: initial;
-border-spacing: unset;
-
- -

border-spacing プロパティは1つまたは2つの値で指定することができます。

- - - -

- -
-
{{cssxref("<length>")}}
-
固定値による間隔の大きさです。
-
- -

形式文法

- -{{csssyntax}} - -

- -

この例では表のセル間において、垂直方向に .5em、水平方向に 1em の間隔を適用します。なお、外の辺においては、表の padding の値が border-spacing の値に追加されます。

- -

HTML

- -
<table>
-  <tr>
-    <td>1</td><td>2</td><td>3</td>
-  </tr>
-  <tr>
-    <td>4</td><td>5</td><td>6</td>
-  </tr>
-  <tr>
-    <td>7</td><td>8</td><td>9</td>
-  </tr>
-</table>
-
- -

CSS

- -
table {
-  border-spacing: 1em .5em;
-  padding: 0 2em 1em 0;
-  border: 1px solid orange;
-}
-
-td {
-  width: 1.5em;
-  height: 1.5em;
-  background: #d2d2d2;
-  text-align: center;
-  vertical-align: middle;
-}
-
- -

結果

- -

{{ EmbedLiveSample('Example', 400, 200) }}

- -

仕様書

- - - - - - - - - - - - - - - - -
仕様書状態備考
{{ SpecName('CSS2.1', 'tables.html#separated-borders', 'border-spacing') }}{{ Spec2('CSS2.1') }}初回定義
- -

{{cssinfo}}

- -

ブラウザーの対応

- -

{{Compat("css.properties.border-spacing")}}

- -

関連情報

- - diff --git a/files/ja/web/css/border-spacing/index.md b/files/ja/web/css/border-spacing/index.md new file mode 100644 index 0000000000..a7eb1e8afe --- /dev/null +++ b/files/ja/web/css/border-spacing/index.md @@ -0,0 +1,129 @@ +--- +title: border-spacing +slug: Web/CSS/border-spacing +tags: + - CSS + - CSS テーブル + - CSS プロパティ + - CSS 表 + - Reference + - リファレンス +translation_of: Web/CSS/border-spacing +--- +
{{CSSRef}}
+ +

CSS の border-spacing プロパティは、 {{htmlelement("table")}} における隣り合うセルの枠線同士の間隔を定めます。このプロパティは {{cssxref("border-collapse")}} が separate のときのみ適用されます。

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

border-spacing の値は、表の外周部分にも使用され、表の境界線と最初/最後の列または行との間の距離は、 (縦または横の) 対応する border-spacing と、表の対応する側 (上下左右のいずれか) の {{cssxref("padding")}} の合計になります。

+ +
+

メモ: border-spacing プロパティは、 <table> 要素の非推奨になった cellspacing 属性と同等ですが、任意で2つ目の値を指定して、左右方向と上下方向に異なる間隔を設定することができる点が異なります。

+
+ +

構文

+ +
/* <length> */
+border-spacing: 2px;
+
+/* 左右の <length> | 上下の <length> */
+border-spacing: 1cm 2em;
+
+/* グローバル値 */
+border-spacing: inherit;
+border-spacing: initial;
+border-spacing: unset;
+
+ +

border-spacing プロパティは1つまたは2つの値で指定することができます。

+ + + +

+ +
+
{{cssxref("<length>")}}
+
固定値による間隔の大きさです。
+
+ +

形式文法

+ +{{csssyntax}} + +

+ +

この例では表のセル間において、垂直方向に .5em、水平方向に 1em の間隔を適用します。なお、外の辺においては、表の padding の値が border-spacing の値に追加されます。

+ +

HTML

+ +
<table>
+  <tr>
+    <td>1</td><td>2</td><td>3</td>
+  </tr>
+  <tr>
+    <td>4</td><td>5</td><td>6</td>
+  </tr>
+  <tr>
+    <td>7</td><td>8</td><td>9</td>
+  </tr>
+</table>
+
+ +

CSS

+ +
table {
+  border-spacing: 1em .5em;
+  padding: 0 2em 1em 0;
+  border: 1px solid orange;
+}
+
+td {
+  width: 1.5em;
+  height: 1.5em;
+  background: #d2d2d2;
+  text-align: center;
+  vertical-align: middle;
+}
+
+ +

結果

+ +

{{ EmbedLiveSample('Example', 400, 200) }}

+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{ SpecName('CSS2.1', 'tables.html#separated-borders', 'border-spacing') }}{{ Spec2('CSS2.1') }}初回定義
+ +

{{cssinfo}}

+ +

ブラウザーの対応

+ +

{{Compat("css.properties.border-spacing")}}

+ +

関連情報

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