Propriété borderRight de style
Exemple
Ajoutez une bordure droite à un élément <div> :
document.getElementById("myDiv").style.borderRight = "thick solid #0000FF";
Définition et utilisation
La propriété borderRight définit ou renvoie jusqu'à trois propriétés border-right distinctes, sous une forme abrégée.
Avec cette propriété, vous pouvez définir/retourner un ou plusieurs des éléments suivants (dans n'importe quel ordre) :
- border-right-width
- style bordure droite
- border-right-color
Prise en charge du navigateur
Property | |||||
---|---|---|---|---|---|
borderRight | Yes | Yes | Yes | Yes | Yes |
Syntaxe
Renvoyez la propriété borderRight :
object.style.borderRight
Définissez la propriété borderRight :
object.style.borderRight = "width style color|initial|inherit"
Valeurs de propriété
Parameter | Description |
---|---|
width | Sets the width of the right border |
style | Sets the style of the right border |
color | Sets the color of the right border |
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: | non spécifié |
---|---|
Valeur de retour : | Une chaîne, représentant la largeur, le style et/ou la couleur de la bordure droite d'un élément |
Version CSS | CSS1 |
Plus d'exemples
Exemple
Modifiez la largeur, le style et la couleur de la bordure droite d'un élément <div> :
document.getElementById("myDiv").style.borderLeft = "thin dotted red";
Exemple
Renvoie les valeurs de la propriété border-right d'un élément <div> :
alert(document.getElementById("myDiv").style.borderLeft);
Pages connexes
Tutoriel CSS : Bordure CSS
Référence CSS : propriété border-right
Référence HTML DOM : propriété border