border-block-start-style

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

試してみましょう

構文

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

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

関連するプロパティとしては、 border-block-end-style, border-inline-start-style, border-inline-end-style が要素の他の境界のスタイルを定義します。

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

<'border-style'>

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

公式定義

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

形式文法

border-block-start-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-start-style: dashed;
}

結果

仕様書

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

ブラウザーの互換性

BCD tables only load in the browser

関連情報