Atributo border-inline-end do CSS

定义和用法

border-inline-end 属性是以下属性的简写:

CSS 的 border-inline-end 属性与 border-bottomborder-leftborder-right and border-top 属性非常相似,但 border-inline-end 属性依赖于行内方向。

注意:相关的 CSS 属性 writing-modetext-orientation and direction Defines the inline direction. This affects the start and end positions of a line, as well as border-inline-end The result of the attribute. For English pages, the inline direction is from left to right, and the block direction is from top to bottom.

Instance

Example 1

Set the width, color, and style for the border at the end of the inline direction:

div {
  border-inline-end: 10px solid pink;
}

Try it yourself

Example 2: Combined with the writing-mode attribute

The position of the border at the end of the inline direction is affected by writing-mode Attribute impact:

div {
  writing-mode: vertical-rl;
  border-inline-end: 5px solid blue;
}

Try it yourself

Example 3: Combined with the direction attribute

The position of the border at the end of the inline direction is affected by direction Attribute impact:

div {
  direction: rtl;
  border-inline-end: 5px solid hotpink;
}

Try it yourself

CSS syntax

border-inline-end: border-inline-end-width border-inline-end-style border-inline-end-color|initial|inherit;

Attribute value

Value Description
border-inline-end-width

Specifies the border width at the end of the inline direction for the element.

The default value is "medium".

border-inline-end-style

Specifies the border style at the end of the inline direction for the element.

The default value is "none".

border-inline-end-color

Specifies the border color at the end of the inline direction for the element.

The default value is the current border color.

Technical details

Technical details

initial Sets this property to its default value. See initial.
inherit Inherits this property from its parent element. See inherit.
Default value: medium none currentcolor
Inheritance: No
Animation creation: Supported. See:Animation-related properties.
Version: CSS3
JavaScript syntax: object.style.borderInlineEnd="pink dotted 5px"

Browser support

The numbers in the table represent the first browser version to fully support this property.

Chrome Edge Firefox Safari Opera
69.0 79.0 41.0 12.1 56.0

Pages related

Tutorial:Borda do CSS

Referência:Atributo border do CSS

Referência:Atributo border-inline do CSS

Referência:Atributo border-inline-end-style do CSS

Referência:Atributo border-inline-end-color do CSS

Referência:Atributo border-bottom-color do CSS

Referência:Propriedade border-left-color do CSS

Referência:Propriedade border-right-color do CSS

Referência:Propriedade border-top-color do CSS

Referência:Atributo CSS direction

Referência:Atributo text-orientation do CSS

Referência:Atributo writing-mode do CSS