A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/css/properties/border-color below:

border-color · WebPlatform Docs

border-color Summary

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 table
Initial value
color: 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.
Applies to
All elements
Inherited
No
Media
visual
Computed value
See individual properties
Animatable
Yes
CSS Object Model Property
borderColor
Percentages
N/A
Syntax Values
<color>
Specify the color to use on all borders. This can be anywhere from one to four values representing the top, right, bottom, and left border respectively.
inherit
Is a keyword indicating that all four values are inherited from their parent’s element calculated value.
transparent
This will apply a border that is not visible but it can have a width applied.
currentColor
The same as ‘color: inherit’, the color value inherited from parent object.
Examples

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;
        }

View live example

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 specifications
CSS Level 3 - Backgrounds and Borders Module
W3C Candidate Recommendation
CSS Level 2 (Revision 1)
W3C Recommendation
CSS Level 3 - Color Module
W3C Recommendation
See also Related articles Border Related pages Attributions

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