StylgrensLinkerKleur Eiendom _
Voorbeeld
Verander die kleur van die linkerrand van 'n <div>-element na rooi:
document.getElementById("myDiv").style.borderLeftColor = "red";
Definisie en gebruik
Die borderLeftColor-eienskap stel of gee die kleur van die linkerrand van 'n element terug.
Blaaierondersteuning
Property | |||||
---|---|---|---|---|---|
borderLeftColor | Yes | Yes | Yes | Yes | Yes |
Sintaksis
Gee die borderLeftColor-eienskap terug:
object.style.borderLeftColor
Stel die borderLeftColor-eienskap:
object.style.borderLeftColor = "color|transparent|initial|inherit"
Eiendomswaardes
Value | Description |
---|---|
color | Specifies the color of the left border. Look at CSS Color Values for a complete list of possible color values. Default color is the current color of the element |
transparent | The color of the left border is transparent (underlying content will shine through) |
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: | huidige kleur |
---|---|
Terugkeerwaarde: | 'n String, wat die kleur van 'n element se linkerrand voorstel |
CSS weergawe | CSS1 |
Meer voorbeelde
Voorbeeld
Gee die linkerrandkleur van 'n <div>-element terug:
alert(document.getElementById("myDiv").style.borderLeftColor);
Verwante bladsye
CSS handleiding: CSS Border
CSS verwysing: grens-links-kleur eiendom
HTML DOM verwysing: grens eiendom