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/column_combinator/index.html | 99 +++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 files/ja/web/css/column_combinator/index.html (limited to 'files/ja/web/css/column_combinator/index.html') diff --git a/files/ja/web/css/column_combinator/index.html b/files/ja/web/css/column_combinator/index.html new file mode 100644 index 0000000000..8e533ec13e --- /dev/null +++ b/files/ja/web/css/column_combinator/index.html @@ -0,0 +1,99 @@ +--- +title: 列結合子 +slug: Web/CSS/Column_combinator +tags: + - CSS + - Experimental + - Reference + - Selectors + - セレクター + - 表 +translation_of: Web/CSS/Column_combinator +--- +
{{CSSRef("Selectors")}}{{Draft}}{{SeeCompatTable}}
+ +

列結合子 (column combinator) (||) は、二つの CSS セレクターの間に配置されます。前者のセレクターに一致する列要素に所属する、後者のセレクターに一致する要素に一致します。

+ +
/* 表の "selected" クラスの列に所属するセル */
+col.selected || td {
+  background: gray;
+}
+
+ +

構文

+ +
column-selector || cell-selector {
+  /* スタイルプロパティ */
+}
+
+ +

Examples

+ +

HTML

+ +
<table border="1">
+  <colgroup>
+    <col span="2"/>
+    <col class="selected"/>
+  </colgroup>
+  <tbody>
+    <tr>
+      <td>A
+      <td>B
+      <td>C
+    </tr>
+    <tr>
+      <td colspan="2">D</td>
+      <td>E</td>
+    </tr>
+    <tr>
+      <td>F</td>
+      <td colspan="2">G</td>
+    </tr>
+  </tbody>
+</table>
+ +

CSS

+ +
col.selected || td {
+  background: gray;
+  color: white;
+  font-weight: bold;
+}
+ +

結果

+ +

{{EmbedLiveSample("Examples", "100%")}}

+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("CSS4 Selectors", "#the-column-combinator", "column combinator")}}{{Spec2("CSS4 Selectors")}}初回定義
+ +

ブラウザーの対応

+ + + +

{{Compat("css.selectors.column")}}

+ +

関連情報

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