Border-style attribute, border-style
The border-style attribute is used to set the style of all borders of an element, or to set the border style for each edge separately.
The border can only appear if the value is not none.
Example 1
border-style:dotted solid double dashed;
- The upper border is dotted
- The right border is a solid line
- The Bottom Frame is a double line
- The left border is a dotted line.
Example 2
border-style:dotted solid double;
- The upper border is dotted
- The right border and the left border are solid lines.
- The Bottom Frame is a double line
Example 3
border-style:dotted solid;
- The upper and lower borders are dotted
- The right border and the left border are solid lines.
Example 4
border-style:dotted;
- All four borders are dotted
Default Value: |
Not specified |
Inheritance: |
No |
Version: |
CSS1 |
JavaScript Syntax: |
Object. Style. borderStyle = "dotted double" |
Possible Value
Value |
Description |
None |
Defines borderless borders. |
Hidden |
Same as "none. Except for tables, hidden is used to resolve border conflicts. |
Dotted |
Defines a dotted border. It is displayed as a solid line in most browsers. |
Dashed |
Define the dotted line. It is displayed as a solid line in most browsers. |
Solid |
Define a solid line. |
Double |
Defines a double line. The width of the double line is equal to the value of border-width. |
Groove |
Defines the 3D groove border. The effect depends on the value of border-color. |
Ridge |
Defines a 3D ridge border. The effect depends on the value of border-color. |
Inset |
Defines the 3D inset border. The effect depends on the value of border-color. |
Outset |
Defines the 3D outset border. The effect depends on the value of border-color. |
Inherit |
It is required that the border style should be inherited from the parent element. |
Description
The most unpredictable border style is double. It is defined as the width of the two lines plus the space between the two lines is equal to the border-width value. However, the CSS specification does not mean whether one line is thicker than the other or whether the two lines should be the same or whether the space between lines should be thicker than the line. All these are determined by the user agent, and the Creator has no influence on this decision.
**************************************** **************************************** * ******* [From another blog]