border-block-style

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2021.

border-block-styleCSS のプロパティで、要素の論理的なブロック方向の境界のスタイルを定義し、それが要素の書字方向やテキストの方向に応じて物理的な境界のスタイルに対応づけられます。これは border-top-styleborder-bottom-style、または border-left-styleborder-right-style のどちらかに対応し、どちらに対応するかは writing-mode, direction, text-orientation で定義された値によって決まります。

試してみましょう

他の方向の境界については、 border-inline-style によって、 border-inline-start-styleborder-inline-end-style の両方を設定することができます。

構文

css
/* <'border-style'> 値 */
border-block-style: dashed;
border-block-style: dotted;
border-block-style: groove;

/* グローバル値 */
border-block-style: inherit;
border-block-style: initial;
border-block-style: revert;
border-block-style: unset;

<'border-style'>

境界のスタイルです。 border-style を参照してください。

公式定義

初期値none
適用対象すべての要素
継承なし
計算値指定通り
アニメーションの種類離散値

形式文法

border-block-style = 
<'border-top-style'>{1,2}

<border-top-style> =
<line-style>

<line-style> =
none |
hidden |
dotted |
dashed |
solid |
double |
groove |
ridge |
inset |
outset

縦書きでの破線の境界

HTML

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

CSS

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

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

結果

仕様書

Specification
CSS Logical Properties and Values Level 1
# propdef-border-block-style

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
border-block-style

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

関連情報