--- title: border-right-style slug: Web/CSS/border-right-style tags: - CSS - CSS プロパティ - CSS 背景と境界 - Reference - border - border-right - border-style translation_of: Web/CSS/border-right-style ---
border-right-style は CSS のプロパティで、要素の右側の境界 ({{cssxref("border")}}) における線の形状を設定します。
このデモのソースファイルは GitHub リポジトリに格納されています。デモプロジェクトに協力したい場合は、 https://github.com/mdn/interactive-examples をクローンしてプルリクエストを送信してください。
/* キーワード値 */ border-right-style: none; border-right-style: hidden; border-right-style: dotted; border-right-style: dashed; border-right-style: solid; border-right-style: double; border-right-style: groove; border-right-style: ridge; border-right-style: inset; border-right-style: outset; /* グローバル値 */ border-right-style: inherit; border-right-style: initial; border-right-style: unset;
border-right-style プロパティは、 {{cssxref("border-style")}} プロパティで利用できるキーワードのうちの一つで指定します。
<table>
<tr>
<td class="b1">none</td>
<td class="b2">hidden</td>
<td class="b3">dotted</td>
<td class="b4">dashed</td>
</tr>
<tr>
<td class="b5">solid</td>
<td class="b6">double</td>
<td class="b7">groove</td>
<td class="b8">ridge</td>
</tr>
<tr>
<td class="b9">inset</td>
<td class="b10">outset</td>
</tr>
</table>
/* 表の外見を定義 */
table {
border-width: 2px;
background-color: #52E385;
}
tr, td {
padding: 3px;
}
/* border-right-style の例のクラス */
.b1 {border-right-style: none;}
.b2 {border-right-style: hidden;}
.b3 {border-right-style: dotted;}
.b4 {border-right-style: dashed;}
.b5 {border-right-style: solid;}
.b6 {border-right-style: double;}
.b7 {border-right-style: groove;}
.b8 {border-right-style: ridge;}
.b9 {border-right-style: inset;}
.b10 {border-right-style: outset;}
{{ EmbedLiveSample('Examples') }}
| 仕様書 | 状態 | 備考 |
|---|---|---|
| {{SpecName('CSS3 Backgrounds', '#the-border-style', 'border-right-style')}} | {{Spec2('CSS3 Backgrounds')}} | 重要な変更はなし。 |
| {{SpecName('CSS2.1', 'box.html#border-style-properties', 'border-right-style')}} | {{Spec2('CSS2.1')}} | 初回定義。 |
{{cssinfo}}
{{Compat("css.properties.border-right-style")}}