Vlastnost grid-template-rows

1
2
3
4
5
6

Vlastnost grid-template-rows určuje výšku řádku (height).

Výpis kódu

<!DOCTYPE html>
<html>
<head>
<style>
.grid-container {
  display: grid;
  grid-template-columns: auto auto auto;
  grid-template-rows: 80px 200px;
  gap: 0.5em;
  background-color: #f1f1f1;
  padding: 0.5em;
}

.grid-container > div {
  background-color: rgba(230, 230, 230, 0.8);
  text-align: center;
  padding: 0.5em;
  font-size: 1.5em;
  border: 1px solid black;
}
</style>
</head>
<body>

<h2>Vlastnost grid-template-rows </h2>

<div class="grid-container">
  <div>1</div>
  <div>2</div>
  <div>3</div>  
  <div>4</div>
  <div>5</div>
  <div>6</div>  
</div>

<p>Vlastnost <em>grid-template-rows</em> určuje výšku řádku (height).</p>

</body>
</html>