CSS border-right-color Property
Example
Set a color for the right border:
div {border-right-color: coral;}
Definition and Usage
The border-right-color
property sets the color of an element's right border.
Note: Always declare the border-style
or the border-right-style
property before the border-right-color
property. An element must have a border before you can change the color.
Default value: | black |
---|---|
Inherited: | no |
Animatable: | yes. |
Version: | CSS1 |
JavaScript syntax: | object.style.borderRightColor="blue" |
- Inherited : "Inherited = no" means that it cannot takes (inherit) it's value from it's parent element.
- object - object in javascript means the element on which
border-right-color
is applied. - Animatable - "Animatable = yes" means that it can be animated with CSS
@keyframes
.
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
border-right-color | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
CSS Syntax
border-right-color: color|transparent|initial|inherit;
Property Values
Value | Description | Demo |
---|---|---|
color | Specifies the color of the right border. Default color is the current color of the element | |
transparent | Specifies that the border color should be transparent | |
initial | Sets this property to its default value. | |
inherit | Inherits this property from its parent element. |
More Examples
Example
Set a color for the right border with a HEX value:
div {border-right-color: #92a8d1;}
Example
Set a color for the right border with an RGB value:
div {border-right-color: rgb(201, 76, 76);}
Example
Set a color for the right border with an RGBA value:
div {border-right-color: rgba(201, 76, 76, 0.3);}
Example
Set a color for the right border with a HSL value:
div {border-right-color: hsl(89, 43%, 51%);}
Example
Set a color for the right border with a HSLA value:
div {border-right-color: hsla(89, 43%, 51%, 0.3);}
Example
Set a transparent right border:
div {border-right-color: transparent;}
Comments
Post a Comment