border-color

Introduction

The border-color shorthand CSS property sets the color (border-top-color, border-right-color, border-bottom-color, border-left-color) of an element's border.

Examples

Syntax

/* border-color: color; */
border-color: red;

/* border-color: vertical horizontal; */
border-color: red #f015ca;

/* border-color: top horizontal bottom; */
border-color: red yellow green;

/* border-color: top right bottom left; */
border-color: red yellow green blue;

Values

The <color> property may be specified using one, two, three, or four values.

Formal definition

Initial valuetransparent
Applies toall elements
Inheritedno
Animatableyes

Formal syntax

<color>{1, 4}

Compatibility

LCD tables only load in the browser

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.