Свойство grid-row-gap
Описание
Определяет размер ширины линий. Вы можете думать об этом, как о настройке ширины отступов между строками.
Синтаксис
grid-row-gap: размер;
Пример
<!DOCTYPE html>
<html lang='ru'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>Document</title>
</head>
<body>
<style>
.container {
grid-template-columns: 100px 50px 100px;
grid-template-rows: 80px auto 80px;
grid-row-gap: 15px;
grid-column-gap: 5px;
width: 300px;
display: flex;
flex-wrap: wrap;
}
#item-t {
width: 80px;
height: 80px;
color: black;
background-color: #97dfc8;
text-align: center;
padding-top: 10%;
}
</style>
<div class='container'>
<div id='item-t'>1</div>
<div id='item-t'>2</div>
<div id='item-t'>3</div>
<div id='item-t'>4</div>
<div id='item-t'>5</div>
<div id='item-t'>6</div>
<div id='item-t'>7</div>
<div id='item-t'>8</div>
<div id='item-t'>9</div>
</div>
</body>
</html>
1
2
3
4
5
6
7
8
9
Читайте также
Применяется к дочернему элементу
Псевдокласс :only-child применяется к дочернему элементу, только если он является единственным у ...
Свойство grid-column-end
Определяет местоположение в сетке ссылаясь на конкретные линии. <br>grid-column-end / grid-...
Свойство place-content
Сокращённое свойство place-content одновременно устанавливает значения свойств align-content и ju...
Стиль первой строки форматированного текста
Псевдоэлемент ::first-line задаёт стиль первой строки форматированного текста. Длина этой строки ...
Свойство flex-wrap
Указывает, следует ли флексам располагаться в одну строку или можно занять несколько строк.<br...