border-block-start-width
border-block-start-width
は CSS のプロパティで、要素の論理的なブロックの先頭側の境界の幅を定義し、それが要素の書字方向やテキストの方向に応じて物理的な境界の幅に対応づけられます。これは border-top-width
, border-right-width
, border-bottom-width
, border-left-width
の何れかに対応し、どれに対応するかは writing-mode
, direction
, text-orientation
で定義された値によって決まります。
試してみましょう
構文
css
/* <'border-width'> 値 */
border-block-start-width: 5px;
border-block-start-width: thick;
/* グローバル値 */
border-block-start-width: inherit;
border-block-start-width: initial;
border-block-start-width: revert;
border-block-start-width: unset;
関連するプロパティとしては、 border-block-end-width
, border-inline-start-width
, border-inline-end-width
が要素の他の境界の幅を定義します。
値
<'border-width'>
-
境界の幅です。
border-width
を参照してください。
公式定義
形式文法
border-block-start-width =
<'border-top-width'>
例
縦書きテキストの境界の太さ
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: 1px solid blue;
border-block-start-width: 5px;
}
結果
仕様書
Specification |
---|
CSS Logical Properties and Values Level 1 # border-width |
ブラウザーの互換性
BCD tables only load in the browser
関連情報
- このプロパティは
border-top-width
,border-right-width
,border-bottom-width
,border-left-width
のうちの1つに対応づけられます writing-mode
,direction
,text-orientation