Propiedad del borde izquierdo de CSS
Ejemplo
Establezca el estilo del borde izquierdo para diferentes elementos:
h1 {
border-left: 5px solid red;
}
h2 {
border-left: 4px dotted blue;
}
div {
border-left: double;
}
Definición y uso
La border-left
propiedad es una propiedad abreviada para (en el siguiente orden):
Si se omite border-left-color, el color aplicado será el color del texto.
Valor por defecto: | medio ninguno color |
---|---|
Heredado: | No |
Animable: | si, ver propiedades individuales . Leer sobre animable |
Versión: | CSS1 |
Sintaxis de JavaScript: | objeto .style.borderLeft="3px punteado azul" |
Compatibilidad con navegador
Los números de la tabla especifican la primera versión del navegador que es totalmente compatible con la propiedad.
Property | |||||
---|---|---|---|---|---|
border-left | 1.0 | 4.0 | 1.0 | 3.5 | 1.0 |
Sintaxis CSS
border-left: border-width border-style border-color|initial|inherit;
Valores de propiedad
Value | Description |
---|---|
border-left-width | Optional. Specifies the width of the left border. Default value is "medium" |
border-left-style | Required. Specifies the style of the left border. Default value is "none" |
border-left-color | Optional. Specifies the color of the left border. Default value is the color of the text |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
páginas relacionadas
Tutorial de CSS: Borde CSS
Referencia HTML DOM: propiedad borderLeft