English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
CSS border-bottom-The color attribute is used to set the color of the bottom border of the element separately. However, in practical work, we usually use the border shorthand property, that isborder-colororborder-bottomto set the style or color of the border.
The following table summarizes the usage context and version history of this attribute.
Default value: | colorAttribute value |
---|---|
Applicable to: | All elements |
Inheritance: | No |
Animatable: | Yes.Please refer to Animation attribute. |
Version: | CSS 1,2,3 |
JavaScript syntax: | object object.style.borderBottomColor="red" |
The syntax of this attribute is as follows:
border-bottom-color: color | transparent | inherit
The following examples demonstrate how to use border-bottom-color attribute.
p { border-style: solid; border-bottom-color: #ff0000; }Test and see‹/›
Note:Must be in CSS border-bottom-color attribute declaration beforeborder-styleThis attribute must be declared before the color attribute of the element, and the element must have a border to set the border color.
The following table describes the value of this attribute.
Value | Description |
---|---|
Color | Specify the color of the top border. SeeCSS color valuesto get the list of possible color values. |
transparent | Allow the border to be transparent, although it may take upborder-widthThe space of the attribute setting. |
initial | Set this attribute to its default value. |
inherit | If specified, the associated element adopts its parent element's border-bottom-The calculated value of the color attribute. |
border-bottom-The compatibility of the color attribute of browsers, the numbers in the following table represent the minimum version number of the browsers that support this attribute, and all mainstream browsers support this attribute.
|
See tutorial:CSS Border,CSS3 Border.
Related properties:border,border-color,border-bottom,border-bottom-style,
border-bottom-width.