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 »
More "Try it Yourself" examples below.
The border-inline-end
property is a shorthand property for these properties:
The CSS border-inline-end
property is very similar to CSS properties border-bottom
, border-left
, border-right
and border-top
, but the border-inline-end
property is dependent on inline direction.
Note: The related CSS properties writing-mode
, text-orientation
and direction
define inline direction. This affects where the start and end of a line is and the result of the border-inline-end
property. For pages in English, inline direction is left to right and block direction is from top to bottom.
Default value: | medium none currentcolor |
---|---|
Inherited: | no |
Animatable: | yes. Read about animatable Try it |
Version: | CSS3 |
JavaScript syntax: | object.style.borderInlineEnd="pink dotted 5px" Try it |
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
border-inline-end | 69.0 | 79.0 | 41.0 | 12.1 | 56.0 |
border-inline-end:
border-inline-end-width border-inline-end-style border-inline-end-color|initial|inherit;
Value | Description | Demo |
---|---|---|
border-inline-end-width |
Specifies the width of an element's border at the end of the inline direction. Default value is "medium" | Demo ❯ |
border-inline-end-style |
Specifies the style of an element's border at the end of the inline direction. Default value is "none" | Demo ❯ |
border-inline-end-color |
Specifies the color of an element's border at the end of the inline direction. Default value is the current color of the border | Demo ❯ |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
The position of the border at the end of the inline direction is affected by the writing-mode
property:
div {
writing-mode: vertical-rl;
border-inline-end: 5px solid blue;
}
Try it Yourself »
The position of the borders at the end of the inline direction is affected by the direction
property:
div {
direction: rtl;
border-inline-end: 5px solid hotpink;
}
Try it Yourself »
CSS tutorial: CSS Border
CSS border property: CSS Border property
CSS border-inline property: CSS Border-inline property
CSS border-inline-end-style property: CSS Border-inline-end-style property
CSS border-inline-start-color property: CSS Border-inline-start-color property
CSS border-bottom-color property: CSS Border-bottom-color property
CSS border-left-color property: CSS Border-left-color property
CSS border-right-color property: CSS Border-right-color property
CSS border-top-color property: CSS Border-top-color property
CSS direction property: CSS Direction property
CSS text-orientation property: CSS Text-orientation property
CSS writing-mode property: CSS Writing-mode property
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!