The best CSS border-color attribute Tutorial In 2024, In this tutorial you can learn Examples,Attribute definitions and instructions,Browser Support,Property Value,related articles,
Set up four border color:
border-color attribute set four border color of an element. This property can have one to four values.
Example:
border-color: red, green, blue, pink;
border-color: red, green, and blue;
border-color: red, green;
border-color: red;
Note: Always put before the border-color border-style attribute to the property declaration.Border element must be obtained before you change its color.
Defaults: | not specified |
---|---|
inherit: | no |
version: | CSS1 |
JavaScript syntax: | object object.style.borderColor = "# FF0000 blue" |
Figures in the table represent the first browser to support the version number of the property.
属性 | |||||
---|---|---|---|---|---|
border-color | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
value | Explanation |
---|---|
color | Specifies the background color. In the CSS color values to find a complete list of color values |
transparent | Specifies the color of the border should be transparent. This is the default |
inherit | Specifies the color of the border, should be inherited from the parent element |
CSS tutorial: CSS Border