Propriété borderBottom de style
Exemple
Ajoutez une bordure inférieure à un élément <div> :
document.getElementById("myDiv").style.borderBottom = "thick solid #0000FF";
Plus d'exemples "Essayez-le vous-même" ci-dessous.
Définition et utilisation
La propriété borderBottom définit ou renvoie jusqu'à trois propriétés border-bottom 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-bottom-width
- style bordure inférieure
- border-bottom-color
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 | |||||
---|---|---|---|---|---|
borderBottom | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Syntaxe
Renvoyez la propriété borderBottom :
object.style.borderBottom
Définissez la propriété borderBottom :
object.style.borderBottom = "width style color|initial|inherit"
Valeurs de propriété
Parameter | Description |
---|---|
width | Sets the width of the bottom border |
style | Sets the style of the bottom border |
color | Sets the color of the bottom 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 inférieure d'un élément |
Version CSS | CSS1 |
Plus d'exemples
Exemple
Modifiez la largeur, le style et la couleur de la bordure inférieure d'un élément <div> :
document.getElementById("myDiv").style.borderBottom = "thin dotted red";
Exemple
Renvoie les valeurs de la propriété border-bottom d'un élément <div> :
alert(document.getElementById("myDiv").style.borderBottom);
Pages connexes
Tutoriel CSS : Bordure CSS
Référence CSS : propriété border-bottom
Référence HTML DOM : propriété border