Propriété CSS border-spacing
Exemple
Définissez l'espacement des bordures d'un tableau :
#table1 {
border-collapse: separate;
border-spacing: 15px;
}
#table2 {
border-collapse: separate;
border-spacing: 15px 50px;
}
Définition et utilisation
La border-spacing
propriété définit la distance entre les bordures des cellules adjacentes.
Remarque : Cette propriété ne fonctionne que lorsque border-collapse est séparé.
Valeur par défaut: | 2px |
---|---|
Hérité: | Oui |
Animable : | Oui. En savoir plus sur l'animation |
Version: | CSS2 |
Syntaxe JavaScript : | objet .style.borderSpacing="15px" |
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-spacing | 1.0 | 8.0 | 1.0 | 1.0 | 4.0 |
Syntaxe CSS
border-spacing: length|initial|inherit;
Valeurs de propriété
Value | Description | Play it |
---|---|---|
length length | Specifies the distance between the borders of adjacent cells in px, cm, etc. Negative values are not allowed.
|
|
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 : Tableau CSS
Référence HTML DOM : propriété borderSpacing