--- title: border-block-width slug: Web/CSS/border-block-width tags: - CSS - CSS Logical Property - CSS Property - CSS プロパティ - CSS 論理的プロパティ - Experimental - Reference translation_of: Web/CSS/border-block-width ---
{{CSSRef}}{{SeeCompatTable}}

border-block-widthCSS のプロパティで、要素の論理的なブロック方向の境界の幅を定義し、それが要素の書字方向やテキストの方向に応じて物理的な境界の幅に対応付けられます。これは {{cssxref("border-top-width")}} と {{cssxref("border-bottom-width")}}、または {{cssxref("border-left-width")}} と {{cssxref("border-right-width")}} のどちらかに対応し、どちらに対応するかは {{cssxref("writing-mode")}}, {{cssxref("direction")}}, {{cssxref("text-orientation")}} で定義された値によって決まります。

/* <'border-width'> values */
border-block-width: 5px;
border-block-width: thick;

関連するプロパティとしては、 {{cssxref("border-inline-width")}}, {{cssxref("border-inline-start-width")}}, {{cssxref("border-inline-end-width")}} が要素の他の境界の幅を定義します。

{{cssinfo}}

構文

<'border-width'>
境界の幅です。 {{cssxref("border-width")}} を参照してください。

形式文法

{{csssyntax}}

HTML

<div>
  <p class="exampleText">Example text</p>
</div>

CSS

div {
  background-color: yellow;
  width: 120px;
  height: 120px;
}

.exampleText {
  writing-mode: vertical-lr;
  border: 1px solid blue;
  border-block-width: 5px;
}

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

仕様書

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

ブラウザーの互換性

{{Compat("css.properties.border-block-width")}}

関連情報