English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
border-right-The color CSS attribute is used to set the color of the right border of the element. However, in many cases, likeborder-colororborder-rightSuch shorthand CSS properties are more convenient and preferable to use.
The table below provides usage instructions and version history of this attribute, as well as its usage syntax in JavaScript scripts.
Default Value: | colorAttribute Value |
---|---|
Applies To: | All Elements |
Inheritance: | No |
Animatable: | Yes.Please refer to Animation Attribute. |
Version: | CSS 1,2,3 |
JavaScript Syntax: | object object.style.borderRightColor="red" |
The syntax of this attribute is as follows:
border-right-color: color | transparent | initial | inherit
The following examples demonstrate how to use border-right-color Attribute.
p { border-style: solid; border-right-color: #ff0000; }Test and see‹/›
Note:You must beborder-styleAttribute is declared before border-bottom-width Attribute. The element must have a border before it can set the border width, because theborder-styleThe default value of the attribute is none.
The table below describes the value of this attribute.
Value | Description |
---|---|
color | Specify the color of the right border. SeeCSS Color Valuesto get the list of possible color values. |
transparent | Allow the border to be transparent, although it may take upborder-widthThe space for attribute setting. |
initial | Set this attribute to its default value. |
inherit | If specified, the associated element adopts its parent element's border-right-The value of the color attribute. |
border-right-The compatibility of the color attribute across browsers, the numbers in the table below represent the minimum version of the browser that supports this attribute; all mainstream browsers support this attribute.
|
See Tutorial:CSS Border,CSS3 Border.
Related Properties:border,border-color,border-right,border-right-style,
border-right-width.