The CSS border-color property sets the color of an element’s four borders. This property can have from one to four values, made up of the elementary properties:
The default color is the currentColor of each of these values.
If you provide one value, it sets the color for the element. Two values set the horizontal and vertical values, respectively. Providing three values sets the top, vertical, and bottom values, in that order. Four values set all for sides: top, right, bottom, and left, in that order.
Overview tablecolor: The value of the 'color' property for each of the border sides border-top-color, border-right-color, border-bottom-color, and border-left-color.
borderColor
border-color: <color>
border-color: currentColor
border-color: inherit
border-color: transparent
A simple example showing how to use the border-color property on HTML div elements.
.one {
color: #6CC644;
border: medium solid;
}
.two {
border: 10px solid;
border-color: #6CC644 #FFC621 #DE6525 #256A84;
}
.three {
border-width: 5px;
border-style: ridge dashed solid;
border-color: #6CC644 #DE6525;
}
.four {
border-width: 3px;
border-style: solid;
border-color: #ccc #666;
}
Usage
The color value can be a property keyword, an extended keyword, or a numerical value. The two property keywords are currentColor and transparent. currentColor is the ‘color’ property value from the parent object. transparent is shorthand for transparent black, rgba(0,0,0,0).
The color value can also be a numerical value, such as one of the following:
The color value can also be an extended keyword, such as aliceblue or lavenderblush. For a full list of extended keywords, see the CSS Color Module Level 3 spec, which is the consolidation of various specifications.
Related specificationsborder-color
Mozilla Developer Network : Article
Microsoft Developer Network: [Windows Internet Explorer API reference Article]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4