Style borderLeftStyle egenskab
- Forrige side borderLeftColor
- Næste side borderLeftWidth
- Gå tilbage til niveau HTML DOM Style objekt
Definition og brug
borderLeftStyle
Indstiller eller returnerer elementets venstre kantstils skabelon.
Se også:
CSS tutorial:CSS kant
CSS reference manual:border-left-style egenskab
HTML DOM reference manual:border egenskab
Eksempel
Example 1
Adds a solid left border to the <div> element:
document.getElementById("myDiv").style.borderLeftStyle = "solid";
Example 2
Changes the left border style of the <div> element to "dotted":
document.getElementById("myDiv").style.borderLeftStyle = "dotted";
Example 3
Returns the left border style of the <div> element:
alert(document.getElementById("myDiv").style.borderLeftStyle);
Example 4
Demonstration of all different values:
var listValue = selectTag.options[selectTag.selectedIndex].text; document.getElementById("myDiv").style.borderLeftStyle = listValue;
Syntax
Returns the borderLeftStyle property:
object.style.borderLeftStyle
Sets the borderLeftStyle property:
object.style.borderLeftStyle = value
Value | Description |
---|---|
none | Defines no border. Default. |
hidden | Same as "none", except when resolving border conflicts in table elements. |
dotted | Defines a dotted border. |
dashed | Defines a dashed border. |
solid | Defines a solid border. |
double | Defines two borders. The width of both borders is the same as the value of border-width. |
groove | Defines a 3D groove border. The effect depends on border-color values. |
ridge | Defines a 3D ridge border. The effect depends on border-color values. |
inset | Defines a 3D inset border. The effect depends on border-color values. |
outset | Defines a 3D outset border. The effect depends on border-color values. |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical details
Default value: | none |
---|---|
Return value: | A string representing the style of the element's left border. |
CSS version: | CSS1 |
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Støtte | Støtte | Støtte | Støtte | Støtte |
- Forrige side borderLeftColor
- Næste side borderLeftWidth
- Gå tilbage til niveau HTML DOM Style objekt