CSS border-top property
Examples
Settings on the border style:
p
{
border-style:solid;
border-top:thick double #ff0000;
}
{
border-style:solid;
border-top:thick double #ff0000;
}
try it"
Attribute definitions and instructions
border-top shorthand property to set all properties on the border to a statement
You can set the following properties in order: border-top-width, border-top-style, and border-top-color.
If you do not set a value which will not go wrong, such as border-top: solid # ff0000; also permitted.
Defaults: | not specified |
---|---|
Inherited: | no |
version: | CSS1 |
JavaScript syntax: | object .style.borderTop = "3px solid blue" |
Browser Support
Figures in the table represent the first browser to support the version number of the property.
属性 | |||||
---|---|---|---|---|---|
border-top | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Property Value
value | description |
---|---|
border-top-width | Specified on the width of the border. See: border-Top-width of the possible values. |
border-top-style | Provisions on border style. See: border-style Top- possible value. |
border-top-color | Color specified on the border. See: border-Top-Color of possible values. |
inherit | Provisions should inherit the setting border-top property from the parent element. |
related articles
CSS tutorial: CSS Border