The best CSS border-style property Tutorial In 2024, In this tutorial you can learn Examples,Attribute definitions and instructions,Browser Support,Property Value,Online examples,related articles,
Set up four border style:
border-style property set four borders of an element of style. This property can have one to four values.
Example:
border-style: dotted solid double dashed ;
border-style: dotted solid double;
border-style: dotted solid;
border-style: dotted;
Defaults: | not specified |
---|---|
inherit: | no |
version: | CSS1 |
JavaScript syntax: | object object.style.borderStyle = "dotted double" |
Figures in the table represent the first browser to support the version number of the property.
属性 | |||||
---|---|---|---|---|---|
border-style | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
value | description |
---|---|
none | No defined borders. |
hidden | And "none" the same. However, when applied to the table except for the table, hidden for solving the border conflict. |
dotted | Defined dot border. Rendered as a solid line in most browsers. |
dashed | The definition of a dotted line. Rendered as a solid line in most browsers. |
solid | The definition of a solid line. |
double | The definition of wire. Double width equal to the value of border-width. |
groove | 3D recess defined border. The effect depends on the border-color value. |
ridge | 3D corrugated defined border. The effect depends on the border-color value. |
inset | Define 3D inset border. The effect depends on the border-color value. |
outset | Define 3D outset border. The effect depends on the border-color value. |
inherit | Provisions should inherit the border style from the parent element. |
Set different borders on each side
This example demonstrates how to set different borders on each side of the element.
CSS tutorial: CSS Border