CSS Reference Property
border-top-color 6gi5z
The border-top-color property is used to set the color of the top border of an element. 6w2l5t
Official Syntax 52n3v
- Syntax:
border-top-color: <color>
- Initial: currentColor
- Applies To: all elements
- Animatable: yes, as a
<color>
Values 6u6u2p
- <color>
-
See the
<color>
property entry for a list of possible values.
Notes 3g6b1p
The border-top-color
property can also inherit the value of the element’s parent’s top border color using the keyword inherit
.
Examples 2w2wp
The following are all valid border-top-color
values set on an element. The element’s border style and border width are also set using the border-top-width
respectively.
.element { border-top-style: dotted; border-top-width: 10px; border-top-color: red; /* or */ border-top-color: #44aacf; /* or */ border-top-color: rgba(255,0,10,.5); }
Browser 3n3564
The property works in all major browsers: Chrome, Firefox, Safari, Opera, IE, and on Android and iOS.