CSS border-block-width Attribute

Definition and usage

related CSS properties Set the border width of the element for property setting in block direction.

Very similar, butTo make related CSS properties A property takes effect only if it is set border-block-style.

related CSS properties The value of a property can be set in different ways:

The border width at the end of the block is 50px related CSS properties Properties have two values:

border-block-width: 10px 50px;
  • border-block-width: 10px 50px;
  • The border width at the beginning of the block is 10px

The border width at the end of the block is 50px related CSS properties If

Set the width of the border for the block direction:
  • Property has one value:

The border width at the beginning and end of the block is 10px related CSS properties CSS properties are related to the CSS properties,border-bottom-width,border-left-width , border-right-width and related CSS properties border-top-width

Very similar, butThe property depends on the block direction. Example 2: Combined with the writing-mode property Note: related CSS properties Defines the block direction. This affects the beginning and end positions of the block, as well as

border-block-width

The result of the property. For English pages, the inline direction is from left to right, and the block direction is downward.

Instance

Example 1
  Property Affects:
  Set the width of the border for the block direction:
writing-mode: vertical-rl;
#example1 {
  Property Affects:
  border-block-width: 10px;
writing-mode: vertical-rl;

border-block-width: 5px;

#example2 {

border-block-width: thin thick; Example 2: Combined with the writing-mode property The borders at the beginning and end of the block direction are affected by

writing-mode
  Property Affects:
  div {
  border-block-style: solid;
writing-mode: vertical-rl;

border-block-width: 5px;

}

Try It YourselflengthCSS Syntax

border-block-width: medium|thin|thick|

|initial|inherit; Property Value
medium Value
Description Specifies a medium border. Default value.
Specifies a thin border. Specifies a thick border.
length Allows you to define the thickness of the border. See:CSS Units.
initial Sets this property to its default value. See initial.
inherit Inherits this property from its parent element. See inherit.

Technical Details

Default Value: medium
Inheritance: No
Animation Production: Supported. See:Animation-related Properties.
Version: CSS3
JavaScript Syntax: object.style.borderBlockWidth="3px 10px"

Browser Support

The numbers in the table represent the browser version that first fully supports this property.

Chrome Edge Firefox Safari Opera
87.0 87.0 66.0 14.1 73.0

Related Pages

Tutorial:CSS Border

Reference:CSS border Attribute

Reference:CSS border-block Attribute

Reference:CSS border-block-end-width Attribute

Reference:CSS border-block-start-width Attribute

Reference:CSS border-block-style Attribute

Reference:CSS border-bottom-width Attribute

Reference:CSS border-left-width property

Reference:CSS border-right-width property

Reference:CSS border-top-width property

Reference:CSS writing-mode attribute