aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/css/column-rule/index.html
blob: cc1879d5597d690d6382284d8c871db67c1c5724 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
---
title: column-rule
slug: Web/CSS/column-rule
tags:
  - CSS
  - CSS Property
  - CSS プロパティ
  - CSS 段組みレイアウト
  - column-rule
  - column-rule-color
  - column-rule-style
  - column-rule-width
  - リファレンス
  - 一括指定プロパティ
  - 段組み
translation_of: Web/CSS/column-rule
---
<div>{{CSSRef}}</div>

<p><strong><code>column-rule</code></strong><a href="/ja/docs/Web/CSS/Shorthand_properties">一括指定</a>を行う <a href="/ja/docs/Web/CSS">CSS</a> のプロパティで、段組みレイアウトで段間に引かれる線の太さ、スタイル、色を設定します。</p>

<div>{{EmbedInteractiveExample("pages/css/column-rule.html")}}</div>

<p class="hidden">このデモのソースファイルは GitHub リポジトリに格納されています。デモプロジェクトに協力したい場合は、 <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> をクローンしてプルリクエストを送信してください。</p>

<p>これは<a href="/ja/docs/Web/CSS/Shorthand_properties">一括指定プロパティ</a>であり、一回の便利な宣言で個別の <code>column-rule-*</code> プロパティ ({{Cssxref("column-rule-width")}}, {{Cssxref("column-rule-style")}}, {{Cssxref("column-rule-color")}}) を設定できます。</p>

<div class="note">
<p><strong>メモ:</strong> 他の一括指定プロパティと同様に、指定されなかった個別の値は初期値が設定されます (以前に個別指定プロパティを使用して設定された値を上書きする可能性があります)。</p>
</div>

<h2 id="Syntax" name="Syntax">構文</h2>

<pre class="brush:css no-line-numbers">column-rule: dotted;
column-rule: solid 8px;
column-rule: solid blue;
column-rule: thick inset blue;

/* グローバル値 */
column-rule: inherit;
column-rule: initial;
column-rule: unset;
</pre>

<p><code>column-rule</code> プロパティは、以下に挙げる値のうち1から3つを任意の順序で指定します。</p>

<h3 id="Values" name="Values"></h3>

<dl>
 <dt><code>&lt;'column-rule-width'&gt;</code></dt>
 <dd>{{cssxref("&lt;length&gt;")}} または3つのキーワード、 <code>thin</code>, <code>medium</code>, <code>thick</code> のうちの1つです。詳しくは {{cssxref("border-width")}} を参照してください。</dd>
 <dt><code>&lt;'column-rule-style'&gt;</code></dt>
 <dd>有効な値と詳細は {{cssxref("border-style")}} を参照してください。</dd>
 <dt><code>&lt;'column-rule-color'&gt;</code></dt>
 <dd>{{cssxref("&lt;color&gt;")}} 値です。</dd>
</dl>

<h3 id="Formal_syntax" name="Formal_syntax">形式文法</h3>

{{csssyntax}}

<h2 id="Examples" name="Examples"></h2>

<h3 id="Example_1" name="Example_1">例1</h3>

<pre class="brush: css">/* "medium dotted currentColor" と同じ */
p.foo { column-rule: dotted; }

/* "medium solid blue" と同じ */
p.bar { column-rule: solid blue; }

/* "8px solid currentColor" と同じ */
p.baz { column-rule: solid 8px; }

p.abc { column-rule: thick inset blue; }
</pre>

<h3 id="Example_2" name="Example_2">例2</h3>

<h4 id="HTML">HTML</h4>

<pre class="brush: html">&lt;p class="content-box"&gt;
  This is a bunch of text split into three columns.
  Take note of how the `column-rule` property is used
  to adjust the style, width, and color of the rule
  that appears between the columns.
&lt;/p&gt;
</pre>

<h4 id="CSS">CSS</h4>

<pre class="brush: css">.content-box {
  padding: 0.3em;
  background: #ff7;
  column-count: 3;
  column-rule: inset 2px #33f;
}
</pre>

<h4 id="Result" name="Result">結果</h4>

<p>{{EmbedLiveSample('Example_2')}}</p>

<h2 id="Specifications" name="Specifications">仕様書</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">仕様書</th>
   <th scope="col">状態</th>
   <th scope="col">備考</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('CSS3 Multicol', '#column-rule', 'column-rule')}}</td>
   <td>{{Spec2('CSS3 Multicol')}}</td>
   <td>初回定義</td>
  </tr>
 </tbody>
</table>

<p>{{cssinfo}}</p>

<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの対応</h2>

<p>{{Compat("css.properties.column-rule")}}</p>