Propriété de style borderLeftStyle
Exemple
Ajoutez une bordure gauche "pleine" à un élément <div> :
document.getElementById("myDiv").style.borderLeftStyle = "solid";
Définition et utilisation
La propriété borderLeftStyle définit ou renvoie le style de la bordure gauche d'un élément.
Prise en charge du navigateur
Property | |||||
---|---|---|---|---|---|
borderLeftStyle | Yes | Yes | Yes | Yes | Yes |
Syntaxe
Renvoyez la propriété borderLeftStyle :
object.style.borderLeftStyle
Définissez la propriété borderLeftStyle :
object.style.borderLeftStyle = value
Valeurs de propriété
Value | Description |
---|---|
none | Defines no border. This is default |
hidden | Same as "none", except in border conflict resolution for table elements |
dotted | Defines a dotted border |
dashed | Defines a dashed border |
solid | Defines a solid border |
double | Defines two borders. The width of the two borders are the same as the border-width value |
groove | Defines a 3D grooved border. The effect depends on the border-color value |
ridge | Defines a 3D ridged border. The effect depends on the border-color value |
inset | Defines a 3D inset border. The effect depends on the border-color value |
outset | Defines a 3D outset border. The effect depends on the border-color value |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Détails techniques
Valeur par défaut: | rien |
---|---|
Valeur de retour : | Une chaîne, représentant le style de la bordure gauche d'un élément |
Version CSS | CSS1 |
Plus d'exemples
Exemple
Changez le style de la bordure gauche d'un élément <div> en "dotted":
document.getElementById("myDiv").style.borderLeftStyle = "dotted";
Exemple
Renvoie le style de bordure gauche d'un élément <div> :
alert(document.getElementById("myDiv").style.borderLeftStyle);
Exemple
Une démonstration de toutes les différentes valeurs:
var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderLeftStyle = listValue;
Pages connexes
Tutoriel CSS : Bordure CSS
Référence CSS : propriété border-left-style
Référence HTML DOM : propriété border