Propriété CSS row-gap
Exemple
Spécifiez un écart de 50 pixels entre les lignes de la grille :
div
{
display: grid;
row-gap: 50px;
}
Plus d'exemples "Essayez-le vous-même" ci-dessous.
Définition et utilisation
La row-gap
propriété spécifie l'écart entre les lignes de la grille.
La row-gap
propriété était autrefois connue sous le nom de .
grid-row-gap
Valeur par défaut: | Ordinaire |
---|---|
Hérité: | non |
Animable : | Oui. En savoir plus sur l'animation |
Version: | Module d'alignement de boîtes CSS niveau 3 |
Syntaxe JavaScript : | objet .style.rowGap="50px" |
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 | |||||
---|---|---|---|---|---|
row-gap (in Grid) | 66 | 16 | 61 | 12.1 | 53 |
row-gap (in Flexbox) | 84 | 84 | 63 | Not supported | 70 |
Syntaxe CSS
row-gap: length|normal|initial|inherit;
Valeurs de propriété
Value | Description | Play it |
---|---|---|
length | A specified length or % that will set the gap between the rows | |
normal | Default value. Specifies a normal gap between the rows | |
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 : Mise en page de la grille CSS
Référence CSS : La propriété gap
Référence CSS : La propriété column-gap