Style borderLeftColor property
- Forrige side borderLeft
- Næste side borderLeftStyle
- Gå tilbage til forrige niveau HTML DOM Style Object
Definition and Usage
borderLeftColor
Sets or returns the color of the element's left border.
See also:
CSS Tutorial:CSS kant
CSS Reference Manual:border-left-color property
HTML DOM Reference Manual:border property
Example
Example 1
Changes the left border color of the <div> element to red:
document.getElementById("myDiv").style.borderLeftColor = "red";
Example 2
Returns the left border color of the <div> element:
alert(document.getElementById("myDiv").style.borderLeftColor);
Syntax
Return borderLeftColor property:
object.style.borderLeftColor
Set borderLeftColor property:
object.style.borderLeftColor = "color|transparent|initial|inherit"
Property value
Value | Description |
---|---|
color |
Specifies the color of the left border. The default is black. Please see CSS color values, for a complete list of possible color values. |
transparent | Left border color is transparent (the underlying content will show through). |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical details
Default value: | black |
---|---|
Return value: | A string that represents the color of the element's left border. |
CSS version: | CSS1 |
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |
- Forrige side borderLeft
- Næste side borderLeftStyle
- Gå tilbage til forrige niveau HTML DOM Style Object