English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
CSS border-The bottom property sets the width, style, and color of the bottom border. It is used to set the bottom border separately, that is, a shorthand property border-bottom-width,border-bottom-styleandborder-bottom-colorIt is a single property declaration.
The following table summarizes the usage context and version history of this property.
Default value: | View all properties |
---|---|
Applicable to: | All elements |
Inheritance: | No |
Animatable: | Yes,Please refer to the individual property.Please refer to Animation properties. |
Version: | CSS 1,2,3 |
JavaScript syntax: | object object.style.borderBottom="2px solid red" |
The syntax of this property is as follows:
border-bottom: [ border-bottom-width border-bottom-style border-bottom-color ] | initial | inherit
The following example demonstrates how to use border-bottom property.
h1 {border-bottom: 5px dashed #ff0000;} p {border-bottom: 3px dotted #00ff00;}Test see‹/›
The following table describes the values of this property.
Value | Description |
---|---|
border-bottom-width | Set the width of the bottom border of the element. |
border-bottom-style | Set the line style of the bottom border of the element. |
border-bottom-color | Set the color of the bottom border of the element. |
initial | Set this property to its default value. |
inherit | If specified, the associated element uses the computed value of the border of its parent element.-bottom. |
border-Browser compatibility of the bottom property, all mainstream browsers support this property.
|
See tutorial:CSS Border,CSS3 Border.
Related properties:border,border-bottom-color,border-bottom-style,border-bottom-width.