CSS border | bootstrap border color
More"TryitYourself"examplesbelow.DefinitionandUsageTheborder-colorpropertysetsthecolorofanelementsfourborders.Thispropertycanhavefromonetofourvalues.Iftheborder-colorpropertyhasfourvalues:border-color:redgreenbluepink;topborderisredrightborderisgreenbottomborderisblueleftborderispinkIftheborder-colorpropertyhasthreevalues:border-color:redgreenblue;topborderisredrightandleftbordersaregreenbottomborderisblueIftheborder-colorpropertyhastwovalues:border-color:redgreen;topandbottombordersareredri...
More "Try it Yourself" examples below.
Definition and UsageThe border-color property sets the color of an elements four borders. This property can have from one to four values.
If the border-color property has four values:
border-color: red green blue pink; top border is red right border is green bottom border is blue left border is pinkIf the border-color property has three values:
border-color: red green blue; top border is red right and left borders are green bottom border is blueIf the border-color property has two values:
border-color: red green; top and bottom borders are red right and left borders are greenIf the border-color property has one value:
Note: Always declare the border-style[1] property before the border-color property. An element must have borders before you can change the color.
Show demo ❯[2]
Default value: The current color of the element Inherited: no Animatable...