Estilo borderLeftColor Propiedad
Ejemplo
Cambia el color del borde izquierdo de un elemento <div> a rojo:
document.getElementById("myDiv").style.borderLeftColor = "red";
Definición y uso
La propiedad borderLeftColor establece o devuelve el color del borde izquierdo de un elemento.
Compatibilidad con navegador
Property | |||||
---|---|---|---|---|---|
borderLeftColor | Yes | Yes | Yes | Yes | Yes |
Sintaxis
Devuelve la propiedad borderLeftColor:
object.style.borderLeftColor
Establezca la propiedad borderLeftColor:
object.style.borderLeftColor = "color|transparent|initial|inherit"
Valores de propiedad
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 |
Detalles técnicos
Valor por defecto: | color actual |
---|---|
Valor devuelto: | Una cadena, que representa el color del borde izquierdo de un elemento. |
Versión CSS | CSS1 |
Más ejemplos
Ejemplo
Devuelve el color del borde izquierdo de un elemento <div>:
alert(document.getElementById("myDiv").style.borderLeftColor);
páginas relacionadas
Tutorial de CSS: Borde CSS
Referencia CSS: propiedad border-left-color
Referencia HTML DOM: propiedad de borde