StylgrensLinkerStyleiendom _ _
Voorbeeld
Voeg 'n "soliede" linkerrand by 'n <div>-element:
document.getElementById("myDiv").style.borderLeftStyle = "solid";
Definisie en gebruik
Die borderLeftStyle-eienskap stel of gee die styl van die linkerrand van 'n element terug.
Blaaierondersteuning
Property | |||||
---|---|---|---|---|---|
borderLeftStyle | Yes | Yes | Yes | Yes | Yes |
Sintaksis
Gee die borderLeftStyle-eienskap terug:
object.style.borderLeftStyle
Stel die borderLeftStyle-eienskap:
object.style.borderLeftStyle = value
Eiendomswaardes
Value | Description |
---|---|
none | Defines no border. This is default |
hidden | Same as "none", except in border conflict resolution for table elements |
dotted | Defines a dotted border |
dashed | Defines a dashed border |
solid | Defines a solid border |
double | Defines two borders. The width of the two borders are the same as the border-width value |
groove | Defines a 3D grooved border. The effect depends on the border-color value |
ridge | Defines a 3D ridged border. The effect depends on the border-color value |
inset | Defines a 3D inset border. The effect depends on the border-color value |
outset | Defines a 3D outset border. The effect depends on the border-color value |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Tegniese besonderhede
Standaard waarde: | geen |
---|---|
Terugkeerwaarde: | 'n String, wat die styl van 'n element se linkerrand voorstel |
CSS weergawe | CSS1 |
Meer voorbeelde
Voorbeeld
Verander die styl van die linkerrand van 'n <div>-element na "dotted":
document.getElementById("myDiv").style.borderLeftStyle = "dotted";
Voorbeeld
Gee die linkerrandstyl van 'n <div>-element terug:
alert(document.getElementById("myDiv").style.borderLeftStyle);
Voorbeeld
'n Demonstrasie van al die verskillende waardes:
var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderLeftStyle = listValue;
Verwante bladsye
CSS handleiding: CSS Border
CSS verwysing: grens-links-styl eiendom
HTML DOM verwysing: grens eiendom