Propriété CSS border-left
Exemple
Définissez le style de la bordure gauche pour différents éléments :
h1 {
border-left: 5px solid red;
}
h2 {
border-left: 4px dotted blue;
}
div {
border-left: double;
}
Définition et utilisation
La border-left
propriété est une propriété abrégée pour (dans l'ordre suivant) :
- bordure-gauche-largeur
- border-left-style (obligatoire)
- border-left-color
Si border-left-color est omis, la couleur appliquée sera la couleur du texte.
Valeur par défaut: | moyen aucune couleur |
---|---|
Hérité: | non |
Animable : | oui, voir propriétés individuelles . En savoir plus sur l'animation |
Version: | CSS1 |
Syntaxe JavaScript : | objet .style.borderLeft="3px pointillé bleu" |
Prise en charge du navigateur
Les nombres dans le tableau indiquent la première version du navigateur qui prend entièrement en charge la propriété.
Property | |||||
---|---|---|---|---|---|
border-left | 1.0 | 4.0 | 1.0 | 3.5 | 1.0 |
Syntaxe CSS
border-left: border-width border-style border-color|initial|inherit;
Valeurs de propriété
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 |
Pages connexes
Tutoriel CSS : Bordure CSS
Référence HTML DOM : propriété borderLeft